LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SAVE CURRENT TIME TO A SPREADSHEET

Hi,
 
I am using LabView 8.2.
 
I am trying to save the current time to a spread sheet in a while loop, see attached. But the data I got was not right. Can you help me check it. Thanks.
0 Kudos
Message 1 of 5
(3,184 Views)
It works if you want to write the timestamp as an array of U8s.Smiley Wink If you want to write it as a string, use the Build Array function on the output of the Format Date/Time String and wire that to the Write to Spreadsheet File.
0 Kudos
Message 2 of 5
(3,182 Views)
Great. I used Build Array function and it worked. But the time I got was 5 hr in advance ( for example, the computer time is 12:23 pm, the time in the spreadsheet is 5:23pm). What's the problem? Thanks
0 Kudos
Message 3 of 5
(3,171 Views)
Probibly it's a matter of your timezone is 5 hrs off from GMT, UCT or whatever they are calling it now. LabVIEW carries timestamps in standard time and in its formatting routines corrects for local time. If you do the conversion yourself you see the internal representation.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 5
(3,168 Views)
I have also gotten it to work by passing the timestamp as a number converted to the floating-point number of days since excel's "beginning of time" and then format the column as time/date. Two conversions are needed: 1) convert number of seconds since time-zero to the number of days since time-zero; 2) compensate for the difference between the time-zero dates used in LV and Excel.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(3,163 Views)