This widget could not be displayed.
This widget could not be displayed.

LabVIEW

This widget could not be displayed.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Convert Time Stamp to String for Filename use

I'm writing an Labview application in which I would like to convert pull time stamp infor from Time Stamp VI and convert to string so I can use to append as part of filename.

 

The fomat that I want may look something like basefilename081208_1300.  This would represent a file name that has elements consisting of the date 08/12/08 and 13:00 hours zulu.

 

Paul 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 1 of 13
(28,177 Views)

Hello:

 

Use the Format Date/Time String VI, and use as the format string the following: %d%m%y_%H%M

 

 This way you'll get the date string you want. 

 

Then concatenate the output to other strings you need to name your file.

 

I've attached an screenshot.

 

Hope this helps.

 

Robst.



Robst - CLD

Using LabVIEW since version 7.0


This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Message 2 of 13
(28,174 Views)

One advice, if you go for a filename with the timestamp in it, you might want to sort the files later on.

So a style of year-month-day-hour-minute-second might be more suitable.

In the function shown by Rob you can include the basefilename as well.

 

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!
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Message 3 of 13
(28,124 Views)

I got the formatting part.

How then to make the string into a file path for saving data to a file?

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 4 of 13
(27,849 Views)

I found it after a long time searching... I should use "string to path."

 

Sorry for the interruption.

 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 5 of 13
(27,842 Views)
This thread has been very helpful, solved me 2 big "HOW-TO" questions! Thank you!
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 6 of 13
(27,108 Views)

Attached is a screen shot of a more complete picture.

Also attached is the complete VI. This is my first try at attaching a VI. Hope it works.

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Message 7 of 13
(27,067 Views)
unfortunately, i have 8.5 in my university, so i cannot load any VI made in 8.6! Thank you for the photo though, it has been very helpful!
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 8 of 13
(27,056 Views)

I saved it as LabView 8.5.

See attached.

 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Message 9 of 13
(27,048 Views)

Thank you Ewjammer!

It works like a charm!

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 10 of 13
(26,994 Views)