LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Excel's Numeric Date to MM/DD/YYYY

Hello,

I found a great VI in the Forums named "Excel Get Data Specified Field.vi".  This  vi will  read all the Excel data and put it into an array.  Works perfect!

The problem I am having is with Excel's Numeric Date Format. 
Excel records dates as numeric values, and the user never sees the raw numeric date...instead the user sees MM/DD/YYYY.  MS Excel starts recording dates from 1900. 
Examples of Excel's numbering:
"1" = 01/01/1900
and
"39176" = 04/04/2007.

I was hoping there might be someone that has already written this VI.  Or possibly, the solution is already built in Labview.  I am using LV 8.2.

Thanks for looking.

Doug
0 Kudos
Message 1 of 3
(5,577 Views)
Hi Dhubbell,
 
I did some searching around, and couldn't find anything that resembled what you needed.  I think this may be something you will need to code.  Most LabVIEW timestamp functions start from 12:00 a.m., Friday, January 1, 1904 and not 1900.  I have a feeling it could be done by using type casting or something similar.  If you do attempt to make the VI please post it for community use :).
Brian K.
0 Kudos
Message 2 of 3
(5,539 Views)
Hello Doug,

Excel can deal very well with "12:00 a.m., Friday, January 1, 1904",
go to  (my Excel is german)
Extras -> Optionen -> Berechnung -> enable option "1904-Datumswerte"

in an english Excel, it should be something like:
Tools -> Options -> Caculations -> "1904-Data values"

And when you divide the seconds through (24*2600) [the seconds of a day]
you are in business.
Now you can format the cell as time or data.

Regards,

Stefan, Ulm, Germany
Message 3 of 3
(5,370 Views)