Discussion:
How to Convert Time Stamp to String for Filename use
(too old to reply)
Paul J S
2008-08-13 17:40:09 UTC
Permalink
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 
Robst
2008-08-13 17:40:09 UTC
Permalink
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.


datetime string.JPG:
http://forums.ni.com/ni/attachments/ni/170/349069/1/datetime string.JPG
TonP
2008-08-14 22:40:16 UTC
Permalink
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
Loading...