LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot Data versus Date without Time (i.e. only 3/3/14 not 3/3/14 05:43:63 PM)

Solved!
Go to solution

I have data by dates I want to plot in LabVIEW. These dates do not have a time associated with them, they are only 3/3/14 for example and in string format. How can I plot these like in excel with the data plotted against the date. 

 

Thanks!

0 Kudos
Message 1 of 3
(2,269 Views)

Hi John,

 

simple solution:

Plot your data on a XY graph. Convert your x data to timestamps, the graph accepts them. Format the x axis to show time using only the date…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,263 Views)
Solution
Accepted by JohnH123456

To wit, there are a number of options to convert the string to timestamp:

 

1) Convert your date string to a cluster of numbers using Scan From String, then convert to a timestamp (link)

2) Use some fancy .NET classes (link)

3) Use Scan From String with your string in appropriate format:

 

timestamp.png

 

This one's a little dirty, however.

---
CLA
Message 3 of 3
(2,253 Views)