LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time format

For a status report showing each command sended and execution of the program, I want to add a time stamp in the beginning of each line of it. To obtain a more clear result, I want all characters in the same space, but I can´t achieve it due to the hour field, as shown in this example:
 
8:57:43 command example1
10:01:07 command example2 
 
I have seen how to remove the leading zeros (with #) from minutes and seconds, but not how to add it to the hour, which is what I´m looking for.
 
I know that there is another option: split the string, analyze the hour and add a initial space if is under 10, but it looks a quite dirty solution. So I guess it can be implemented with the time format string. Somebody knows how?
 
Thanks.
 
Gatet
0 Kudos
Message 1 of 2
(2,380 Views)

Hello

If using format date/time string, use this string format    %H:%M:%S   (%I   for 12 hours).

It should keep the fields constant, adding a 0 to hours when necessary.

Hope it helps.

Alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 2 of 2
(2,373 Views)