ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

excel time string

Hello,
 
i've got a problem with an Excel import. One cell is a date like 07.2.2008.
LV reads it a string array with 39485 for the date.
Is it possible to transform it back to the date?
 
Markus
 
 
 
0 Kudos
Message 1 of 3
(3,809 Views)
Hi John,

Excel stores dates (usually) as number of days since 01.01.1900 - hence 39485 is 07.02.2008.
You can do two things:
1) switch excel to use the 01.01.1904 as start date (like LabView does)
2) subtract the offset of 4 years (number of days=1462) from the Excel date number (39485-1462)

Then you have to multiply the resulting number by 86400 (seconds per day), this can be wired to the LabView time functions...


Message Edited by GerdW on 02-18-2008 12:59 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(3,799 Views)

Hi GerdW

as always the real good answers can be found in the LabView discussion forum - thanks a lot !

regards HU

0 Kudos
Message 3 of 3
(3,645 Views)