From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UTC +-0.001 seconds

Actually using %^<>T as format string container as mentioned by ogk.nz treats the string directly as UTC. However I found something else on my computer which sounds strange. I had to remove the %p format specifier and instead use the 24 hour clock here, in order for the Scan from String function not to return with error 1 (argument error).  Also using %p in a Format to String function produces an empty string.

And for some reasons I seem not to be able to change the data and time format from the HH:mm:ss on my Windows 10 system. Maybe it's one of the settings our company feels should not be changed, after all who the heck still uses this pretty confusing AM/PM clock anymore? Smiley Very Happy

 

But even changing the country setting from Netherlands to United States didn't seem to allow LabVIEW to use the %p format specifier on my computer. So definitely something else to consider for people who need their application to run in more countries than just their own.

UTC Timestamp.png

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 12
(766 Views)

This all sounds vaguely familiar.  I want to say some message from about a year ago.

 

I wonder if I can come up with the right keywords and find it.

 

EDIT:

Maybe this is it.

http://forums.ni.com/t5/LabVIEW/Scan-from-String-to-get-Timestamp-Problem-in-LV-2012/td-p/2755506

 

The reason is seemed familiar is because it is one of the relatively few posts I started.  And it was actually about 2 years ago.

It talks about errors in the time and scan from string functions, but related to 2 and 4 digit years, not AM/PM vs. 24 hour clock.

 

I'll have to keep looking to see if there is anything more directly related.

 

EDIT #2:

Found this from 6 years ago.  More relevant.

http://forums.ni.com/t5/LabVIEW/scan-from-string-does-not-recognize-AM-PM-flag/td-p/1479438

0 Kudos
Message 12 of 12
(749 Views)