LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Time Stamp to String

Solved!
Go to solution

What is the most efficienct way to convert a Time Stamp Control to a MM/DD/YYYY string? I am going to use its output as date parameters to a WHERE clause to a SQL Server query.

0 Kudos
Message 1 of 7
(11,349 Views)
Solution
Accepted by topic author Eric1977

Format Date/Time String is a simple option.

 

0 Kudos
Message 2 of 7
(11,345 Views)

I skipped right by that. I must not have had enough coffee yet this morning. Smiley Very Happy

 

Thank you.

0 Kudos
Message 3 of 7
(11,332 Views)

You're welcome Smiley Happy

 

0 Kudos
Message 4 of 7
(11,329 Views)

aa.png

 

Those format codes can be tricky to write from scratch. I usually format a timestamp constant the way I want it displayed, switch to advanced format editing and copy the format string.


"Should be" isn't "Is" -Jay
Message 5 of 7
(11,328 Views)

Jeff,

 

I just did it like this. Do you forsee any problems? I noticed yours had the greater than and less than math operators near the beginning and end of the format string.

 

TimeStampString.png

0 Kudos
Message 6 of 7
(11,323 Views)

@Eric1977 wrote:

Jeff,

 

I just did it like this. Do you forsee any problems?

 


 

Well, what is the output? Do you foresee a problem? The LabVIEW Help is quite clear on the format. The very first sentence of the Help file for the Format Date Time String provide a link to the codes: http://zone.ni.com/reference/en-XX/help/371361H-01/glang/codes_for_time_format_str/

0 Kudos
Message 7 of 7
(11,320 Views)