LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write timestamp to a text file then convert it back to timestamp

Hi,

I am trying to write time stamp to a text file then read it from another vi then convert it back to time stamp which will be used as the x axes in XY graph later. 

Any suggestions on how to implement this?

Thanks.


hellolv
0 Kudos
Message 1 of 2
(2,373 Views)


@hellolv wrote:
Hi,

I am trying to write time stamp to a text file then read it from another vi then convert it back to time stamp which will be used as the x axes in XY graph later. 

Any suggestions on how to implement this?



This is seldom a good idea since there are so many different string formats for date and time. But if you really want to do that you will have to look into Format Date/Time String or Get Date/Time String functions to get your time string, making sure to select a specific date/time format instea of the local one. Then on returning the string you use the Scan from String function to convert the string into its exact indiviual numbers and possibly month and weekday names and then for as far as they are not yet numbers convert them into numbers and now you can use Date/Time to Seconds to get your timestamp back. Nasty an laboursome but there is no other way due to the multitue of time formats around the world.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(2,360 Views)