PDA

Click to See Complete Forum and Search --> : Excel serial date conversion


stricknyn
Sep 4th, 2007, 03:30 PM
Hello all,

Wondering if anyone has come accross this. I am connecting to an excel file using oledb and filling a datatable with the results. One of the fields is in excel serial format. I've been trying to figure out how to convert this to a date in my program for hours now.

Note: I must convert in my program. I cannot open excel and formmat as date which I know I can do if I open excel.

So for example, the serial number for 39228 is 5/26/2007. My program sees 39228 in the datatable. I want this to be 5/26/2007 but I haven't come accross any built in vb.net functions that will convert.

Do does anyone know how to convert from serial number to date?

Thanks in advance,

Strick