Convert Excel Julian to VB.NET Date

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • simchajoy2000@yahoo.com

    #1

    Convert Excel Julian to VB.NET Date

    Hi,

    I am reading some dates from an Excel worksheet in my VB.NET code and
    even though in Excel these dates appear in this format 3/18/04, it is
    read into my code as a number like this: 36903.

    I have been told this is a Julian date but the calculations I have
    found on the internet to handle the conversion gives me dates from 1938
    - so either this isn't a Julian number or excel has it's own way of
    calculating it.

    Can someone help me? I really need to know how to convert this number
    to a date.

    Thanks!

    Joy

  • Phill  W.

    #2
    Re: Convert Excel Julian to VB.NET Date


    <simchajoy2000@ yahoo.com> wrote in message
    news:1143481491 .925085.299670@ j33g2000cwa.goo glegroups.com.. .
    [color=blue]
    > I am reading some dates from an Excel worksheet in my VB.NET code and
    > even though in Excel these dates appear in this format 3/18/04, it is
    > read into my code as a number like this: 36903.[/color]

    IIRC, Excel holds dates as days since 0-Jan-1900.
    Experiment with putting numbers into Excel and formatting them as dates,
    and vice versa.

    BTW, I can't reproduce the values you gave above:
    18-Mar-2004 => 38064
    36903 => 12-Jan-2001

    Regards,
    Phill W.


    Comment

    Working...