ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with time date convertion

Hello!! I saved a txt file with acquired data (with the funcion "write string to spreadsheet file") in this format:
 
hour.minutes.seconds     data0
nour.minutes.seconds     data1
............
 
Then I have to open this file and transform the first column in total seconds (each element of first column is in string format, the problem is that I have some dot to separe hour minutes and seconds):
 
tot seconds  data0
tot seconds  data1
........
 
I don't know how to do this.
I attach the file with saved data.
0 Kudos
Message 1 of 3
(2,667 Views)
Hi maumontesi,

wow, a German-style text file Smiley Wink

Read in the text file and convert the string(s) using 'Scan from string' with this format string: %d.%d.%d %,;%f (convert 3 integer numbers separated by points and one float with comma as decimal separator). Do simple math with those integers [total = (hours*60+minutes)*60+seconds].

Message Edited by GerdW on 05-04-2007 04:28 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,666 Views)
Thank you kindly!!!
0 Kudos
Message 3 of 3
(2,660 Views)