LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create date/time as filename

hi im new member,

Im trying to create date/time as filename. from get date/time result string right? then i concatenate with .txt and input in built path. but the output says "not a correct path". whats wrong with this? can someone help me? thanks a lot
0 Kudos
Message 1 of 3
(3,740 Views)
In using GetDateTime String, the date output is like 12/23/2005. The forward slashes cannot be used in a filename. I'm not sure about the colon in the time output, like 12:43 PM. You should wire the date output to a Search and Replace String function. Search for forward slash and replace with dash. Be sure to set the boolean input for Replace All to True. Same for the time function, replace the colon if you get filename errors.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 3
(3,732 Views)
Yes, Both "/" and ":" are not acceptable characters in file names.

Instead of using "Search and replace", Use the "Format Date/Time string" .. SEE the attachment
-----------------------------
Ayman Mohammad Metwally
Automation Engineer
Egypt - Cairo
Message 3 of 3
(3,718 Views)