10-23-2013 12:48 PM
I am trying to aquite the date and time string from an excel file.
I have already read this:
http://digital.ni.com/public.nsf/allkb/01B026BEB54E3414862571B600618827
Which allowed me to get the date string. But it does not read the time.
How can i get the date and time string?
10-24-2013 12:04 AM
Excel stores date/time as a Serial Date, representing everything in units of "Days". If you use the integer part of the Excel value, you can get the Date, as it is "number of days since 1 Jan 1904" (with some slop for time zones and other peculiarities). The "fraction of a day" is the time (again, may need to fudge time zones) -- if you take the fractional part and multiply it by 86400 (# seconds in a day), you'll get time in seconds, and can split off Hours and Minutes by dividing twice by 60 (60 seconds/minute, 60 minutes/hour).