12-13-2022 07:09 AM
Hello
I am currently saving data from a labview application into a text file. It contains multiple columns and rows. the 1st column is time and date data in the format the client prefers, subsequent columns displays temperature data. I would like to be able to display this data on a graph with the 1st column(time and date) being on the x Axis and then subsequent columns showing the temperature data.
The temperature data is straight forward to handle but I am struggling to get the correct format on the time date column for the X axis.
I understand maybe a solution is to initially save the date.time in different format, but i would prefer to work with the file contents as it is now.
Many thanks in advance.
I have attached a sample file
Solved! Go to Solution.
12-13-2022 07:27 AM - edited 12-13-2022 07:28 AM
Hi Lee,
@LeeBowers1 wrote:
I am currently saving data from a labview application into a text file. It contains multiple columns and rows. the 1st column is time and date data in the format the client prefers,
The temperature data is straight forward to handle but I am struggling to get the correct format on the time date column for the X axis.
Try ScanFromString with %<%d/%m/%Y %H:%M>T to scan the timestamp...
(I guess it is day first, month 2nd because of the "Winter" mode - and the 24h mode. 🙂)
12-13-2022 08:14 AM
Hello
Yes, scan from string - works a treat 🙂 Once I worked out format for input, in my case ending up being %<%d/%m/%Y %H:%M>T
I have attached my interim solution, ready to build into my applicaiton
Thank you
12-13-2022 08:26 AM - edited 12-13-2022 08:33 AM
@GerdW wrote:
Hi Lee,
@LeeBowers1 wrote:
I am currently saving data from a labview application into a text file. It contains multiple columns and rows. the 1st column is time and date data in the format the client prefers,
The temperature data is straight forward to handle but I am struggling to get the correct format on the time date column for the X axis.
Try ScanFromString with %<%d/%m/%Y %H:%M>T to scan the timestamp...
(I guess it is day first, month 2nd because of the "Winter" mode - and the 24h mode. 🙂)
Thusly
The display is m/d/Y but that does not change the DATA of output 1 (Timestamps are stored internally as UTC) Its that "%<>T" that clues LabVIEW to use an Absolute Time container