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: 

time to timestamp, wrong convertion

Solved!
Go to solution

Get at wrong convertion using this code to convert time to timestamp.

I can't figure out why?

The wrong result is in the constant in the to right corner.

snip.png

0 Kudos
Message 1 of 6
(2,664 Views)
Solution
Accepted by topic author Michael.Koppelgaard

Working with a 24 hour and no am/pm.  So you should have %H instead of %I and the %p should not be there.

 

Result:

%<%H:%M:%S%3u %d/%m/%Y>T


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(2,631 Views)

Still get 12 h format:snip2.png

 

 

0 Kudos
Message 3 of 6
(2,629 Views)

But it's not wrong anymore. Thanks 🙂

Is it possible to get the result in 24 hour format?

0 Kudos
Message 4 of 6
(2,621 Views)

What I gave you was the format of the string input.  That is what you need to convert to the timestamp data type.  The format of your indicator is purely based on the properties of said indicator.  Right click on the indicator and choose Display Format.  You can set it to show the time in any format you want.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 6
(2,602 Views)

great 🙂

0 Kudos
Message 6 of 6
(2,532 Views)