LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format Codes for the Time Format String

Hello guys...

I have 1 simple question.How to write a code in time format string.for example...%H%M%S for HH:MM:SS.So I want to add fractional seconds in this code...refer to the labview help,the code for fractional seconds is <%<digit>u>.But I'm little bit confuse just now.Should I put like this : %H%M%S%digitu. Or any other else?...thank u
0 Kudos
Message 1 of 5
(4,348 Views)


@TaKiMi wrote:
the code for fractional seconds is <%<digit>u>.But I'm little bit confuse just now.Should I put like this : %H%M%S%digitu. Or any other else?...thank u

If you want 3 digits of fractional seconds, you would use 3u.

A format of

  • %H:%M:%S%3u would give you: 23:24:00.343 (for example)
  • %H:%M:%S%2u would give you  23:24:00.34 (for example).

Don't forget the ":" if you want them in the formatted string! All clear? 🙂

Message Edited by altenbach on 09-09-2007 11:29 PM

Message 2 of 5
(4,346 Views)
Here's the full set:

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 5
(4,334 Views)
Hi altenbach...

Thank U very much....I am very grateful for your help.Now I using Scan From String to scan this time/date string and convert the string according to format string.Can it convert  into numeric data type?. I mean all parameter such as / and : in date/time value could display in numeric data type too...
0 Kudos
Message 4 of 5
(4,333 Views)
Just convert it to a date/time record and use "unbundle by name" to pick all the parts you want. 🙂
 
(You only need to show the outputs you need)
 
 

Message Edited by altenbach on 09-10-2007 12:01 AM

Message 5 of 5
(4,325 Views)