LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get correct date on X-axis of my X-Y graph?

On the attached vi the times on my X-axis are not coming out correctly. My current time is 2:20 pm (14:20) but the graph is showing 10:20. How do I get the correct time displayed on the X-axis?
0 Kudos
Message 1 of 4
(2,798 Views)
Rick,
This is a good question and I am not at all not surprised that you are confused here. The problem you experience has its explanation in the definition of time Zero. In LabVIEW it seems like time Zero is defined as 8:00 pm on December 31, 1903. And NOT at midnight... Consequently, in your program where you calculate the seconds you have to add another 14400 seconds to compensate for the four hour time shift. There are other ways of doing this task but I wanted to explain what you are actually seeing in your code. I hope this helps. /Mikael Garcia
Message 2 of 4
(2,798 Views)
Hi RicK,

Check the time-zone your PC is configured for.

If it is set for the wrong time-zone it could cause the problem.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 4
(2,798 Views)
Actually, time zero IS midnight...0:00 AM Jan 1 1904, UNIVERSAL time (GMT). Mikael there must be in US Central time zone (GMT-6 hours). You may be in a different time zone. Check your computer clock setting for time zone. Also, Universal time does not use daylight saving time (if I remember correctly).
0 Kudos
Message 4 of 4
(2,798 Views)