LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time stamp not recognized by Excel

I am working on a VI to collect data from 16 load cells. I am using FieldPoint. The VI saves this data to Excel and puts a timestamp along with the data. The problem is this. The number in the timestamp cannot be converted by Excel into a useable time. I have placed a probe on both sides of the conversion from the timestamp and verified the problem. There is probably another way to skin this cat.
 
gasseous


Message Edited by gasseous on 07-29-2008 01:20 PM
gasseous

One test is worth a thousand expert opinions
0 Kudos
Message 1 of 16
(4,568 Views)
Remember that LabVIEW gives time as second since  1/1/1904.  Excel time is based on days since 1/1/1900.  You may have to perform some conversions.
Message 2 of 16
(4,561 Views)

Ravens Fan,

That is what I figured. Making that conversion seems to be the problem.

 



Message Edited by gasseous on 07-29-2008 02:02 PM
gasseous

One test is worth a thousand expert opinions
0 Kudos
Message 3 of 16
(4,555 Views)
See here.
0 Kudos
Message 4 of 16
(4,549 Views)

Thanks for the VI.... I duplicated it and put in the numbers. Excel seems to be about 5 hours off.... It reads 20:00:00 instead of 15:00:00

 

gasseous

One test is worth a thousand expert opinions
0 Kudos
Message 5 of 16
(4,530 Views)
You may need to factor in which time zone your in, and possibly daylight savings times in your calculations.  LabVIEW time is based on GMT.
Message 6 of 16
(4,525 Views)

I went in and subtracted (5) hours x (60) seconds x (60) minutes from the 126316800 constant. This made the time correct. Surely NI has come up with a better method than this? I need to take this system to all corners of the globe and hate to have to adjust the time to match.

 

I also had to delete the date time to seconds vi and associated hookup in order to get the time to work. I replaced all of this with the get date time vi and it seems to work fine. Excel now can convert the output to a useable number.

 

Thank you for all the help!

gasseous

One test is worth a thousand expert opinions
Download All
0 Kudos
Message 7 of 16
(4,504 Views)
Why do you believe that this is NI's fault? Time, after all, is relative. Whenever you're interfacing between two different publishers who measure time differently you will have this problem. One could make the same argument and say that the problem is with Microsoft's software.
Message 8 of 16
(4,497 Views)

I am not blaming LabView... it just seems that someone would have figured this out before... Thanks for the help though....

BTW, do I need to adjust the constant if I go to Japan or will changing the time on my PC take care of it?

gasseous

One test is worth a thousand expert opinions
0 Kudos
Message 9 of 16
(4,490 Views)

I am not blaming LabView... it just seems that someone would have figured this out before... Thanks for the help though....

BTW, do I need to adjust the constant if I go to Japan or will changing the time on my PC take care of it?

gasseous

One test is worth a thousand expert opinions
0 Kudos
Message 10 of 16
(4,490 Views)