LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UNABLE TO READ DATE FORMAT(DD/MM/YY) FROM EXCEL

Why are you subtracting a half a day?
0 Kudos
Message 11 of 23
(2,278 Views)
Its a fudge number. A whole number put the time in the PM close to midnight. To lessen the chance of the date being off a day the 0.5 puts the time in the AM.
0 Kudos
Message 12 of 23
(2,263 Views)
Rather than using a fudge number, it would be better to do the actual conversion from Excel date to LabVIEW date.  In this thread, I posted an example which calculates this accurately because the time zone has an effect on the number.  While your fudge factor may work for some people, there would be timezones where it does not work.
0 Kudos
Message 13 of 23
(2,249 Views)
The example I gave Does convert from the Excel date (40155) to a format LabVIEW can display (12/8/2009). Your example converts LabVIEW Time to a date for Excel. Unless you manually change the timezone factor in your application which calculates a constant of -.208 the constant always remains the same  as compared to my 0.5 days. 0.5 days was a rough guess to give an example not an exact science.  In this application he is only interested in the date a few hours to account for time zone may not make much difference.
0 Kudos
Message 14 of 23
(2,241 Views)

Okay, it was doing the reverse operation.

 

In that case, you use that example I gave but do the inverse operations to go from Excel date to LV date.

0 Kudos
Message 15 of 23
(2,237 Views)
Did any of this help Shruti G?
Tim
GHSP
0 Kudos
Message 16 of 23
(2,224 Views)

thanks for the reply....

 

and sorry for late raply...

 

i will try this and will get back to you all if still i have problems.......

 

thank you.......

0 Kudos
Message 17 of 23
(2,211 Views)

Thanks Rob_F1!  That worked!  I can't believe all the examples people illustrate, but, yours was the best!  Thanks again for a solution to my Excel WHOLE NUMBER to MM/DD/YYYY problem.  I only wish I saw your post first.  Great Work and Kudos to You!


Doug

0 Kudos
Message 18 of 23
(1,622 Views)

Interestingly, this example shows Excel date 1 as 12/31/1899, not 1/1/1900 (at least for me)...

0 Kudos
Message 19 of 23
(1,314 Views)

Your time zone differential might be different.

 

LabVIEW bases time stamps on UTC time.  Excel bases it on your local time zone.

0 Kudos
Message 20 of 23
(1,311 Views)