LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I display date+time and not the point number in excell?

Hi everyone,
 
Could anybody tell me how I can save date + time to a file, so that  I can display on a diagram(excel) : date+time in (ox) and data (oy)? :
My program sets in (ox) the point number and not the date+time....( although  date and time are written correctly in the column...)
 
Any help would be great,
 
Thanks,
 
regards,
 
Marc
0 Kudos
Message 1 of 3
(3,222 Views)
hi there,
 
excel uses 01.01.1900 00:00 as the time offset, LabVIEW uses 01.01.1904 02:00, so you can't display the correct datetime in excel when you write the time as a fractional number of seconds from LabVIEW. you must format the datetime in LabVIEW to a string and write that to the column. use the "Format Date/Time String" - function and for example "%d.%m.%Y %H:%M:%S%3u" as the format string (see the functions help for more examples). you also could format your data to a string using "Format Into String" - function and write the file as a 2D string array. the decimal point you have to use depends on your system and its settings, but you can specify the decimal point in the Format string like "%.;%f" (means fractional number with point as decimal point).
 
best regards
chris 
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 3
(3,209 Views)
Hello Marc & Chris,

if the problem is just the different time base why not add an offset to Labview's "number of seconds"? It should be something around 126230400 (please check this number...). Forgot to mention: Excel uses days since time base, Labview counts seconds since time base. So you have to divide Labview-seconds by 86400 to get Excel-date.
This way you can save numbers instead of formatting to time string (which may lead to problems when importing data to excel using different regional settings!)

Message Edited by GerdW on 08-31-2005 09:40 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(3,204 Views)