LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

conversion of time format

conversion of string indicators containing 12Hour -time format into 24hour-time format

ie  1:35:00 pm(12hour time-format)  to  13:35:00(24-hour format)

0 Kudos
Message 1 of 9
(3,725 Views)

I'm not sure what your question is but if you want 24 hour display just open the indicator properties and change it on the Display Format tab.

 

P.S.  Please avoid .docx format for posting.  They can contain viruses and many won't open them.  Just post a picture, or better, your VI.  Smiley Wink

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 2 of 9
(3,715 Views)

First off DO NOT paste a picture into a Word document then attach the document. Use the Insert Image function the forum has.

 

image.PNG

 

Also I am not sure exactly what you are asking. But here is how to format a time stamp into 12 and 24 hour time strings

 

Timeconvert.png

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 9
(3,710 Views)

I highly recommend giving the LabVIEW help a good read.

Format Specifier Syntax

Format Codes for the Time Format String


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 4 of 9
(3,706 Views)

actually i have taken a numeric control of time- date format in which display format of time is 24-hour type but the requirement is that the numeric control should be converted into string type in which display format is 24-hour type.

 

 

how to achieve this?

 

 

 

 

0 Kudos
Message 5 of 9
(3,674 Views)

Have you even bothered to read the thread that you created?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 9
(3,661 Views)

@priya2207 wrote:

actually i have taken a numeric control of time- date format in which display format of time is 24-hour type but the requirement is that the numeric control should be converted into string type in which display format is 24-hour type.

 

 

how to achieve this?

 

 


The two posts from RTSLVU and crossrulz right above have already specified the answer.  Use the Format Date/Time String VI.  Learn how to set the format string to get the desired text output by looking at the help or reading the links above.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 7 of 9
(3,643 Views)

Read the two attached docuents from LabView Help

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 9
(3,635 Views)

@priya2207 wrote:

actually i have taken a numeric control of time- date format in which display format of time is 24-hour type but the requirement is that the numeric control should be converted into string type in which display format is 24-hour type.


You have two options: Format Date/Time String or Format String.  I prefer Format String since I am usually combining other things.  For the format string, follow formats given in the LabVIEW Help (follow the links I already gave you).


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 9 of 9
(3,610 Views)