Hi John,
Thank you for the response.
The expression ""&LocalTime() shows as 08:35
whereas LocalTime() shows as 08:35:46
None of these would suit my project requirements.
My intention is to use the date as well as time with seconds in a file name because slash / and colon : cannot be used in file name I want to use it with hyphen and underscores as below.
Format: dd-mm-yyyy HH_MM_SS
Output: 25-05-2020 08_35_46
1. This is not achievable through the FormatDateTime function (due to which this thread has been opened).
OR
2. Also the below does NOT work as it again excludes the seconds
Replace(LocalTime(), ":", "_")
OR
3. First store LocalTime() to a Time DataItem
and then use Replace([myTime],":", "_") on that DataItem throws a 'Text cannot be interpreted as a Time' error message.
Using ToTime conversion also throws an error.
It was preferable to use a single line of FormatDateTime function.
But since neither of these 3 options work what are the other options you would like to suggest?
Also maybe you might want to report the bug about FormatDateTime function
Or let me know if there is a way to report a bug.
------------------------------
Vijay
------------------------------
Vijay