05-23-2026 02:10 PM
Is there a way to do the following
From text constant and convert that directly into a timestamp that I can use for the X axis for a graph?
Solved! Go to Solution.
05-23-2026 04:14 PM - edited 05-23-2026 04:18 PM
Hi LED47,
Use "Scan From String" with a timestamp format specifier:
When parsing only a date (without time), LabVIEW adds 1 hour for some reason, so if you want midnight (start of the day), just add a zero for the hours.
Question: Are you sure your input will only contain the date, and not also the time (such as for example "8:45:12.123")?
Parsing a date-only string as a timestamp and using it for the X axis of a graph seems very unusual.
Regards,
Raphaël.
05-23-2026 05:16 PM
Kudos to @raphschru!
Yes, the peculiarity of dealing with TimeStamps in "Human-readable Formats" drove me crazy when I tried to record EEG-like signals in a study a decade or so ago.
Unfortunately, I don't have the code handy to see how I managed to get things working. I do remember being at an NI Week meeting with my laptop, and noticing my test runs were 1 hour off -- I happened to be at NI Week (so you know it's at least 6-8 years ago), and forgot that Texas is in a different time zone from where the data were acquired, so the "hours" were off by one.
Bob Schor
05-23-2026 05:34 PM
Seek and you shall find, thank you very much perfect