Convert Excel Julian to VB.NET Date

  • Thread starter Thread starter simchajoy2000
  • Start date Start date
S

simchajoy2000

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
 
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.

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.
 
Back
Top