I guess that the issue is in the value that you want to format. Most likely your default time format in the Control Panel is setup as "h:mm:ss tt". When the value to be formated is not recognized as a time value the format fails. Here is an example: dim current_time, datetime dim format_time, string //now (current_time) set(current_time, "1/1/01 11:10:35") format (current_time, "hhmmss", format_time) As you cane see I changed the datatype of current_time variable to datetime : It does not recongise the mask as as a valid time format. : What you want can do more simple, in one line : Dim format_time, string, "@T"hhmmss"" : Actually you don't even need that line, you can insert @T"hhmmss" : and other macro-parameters directly in the place where you need it, for : example : FileSave "c:\\data\\my_file_with_time@T"hhmmss"", : "some text"
|