Issue Adding Run Date to Exported File Name

User4847 (2 posts)
January 18, 2017 12:34 PM
Accepted Answer
I'm trying to add a timestamp to the end of a file name but I just get "~c9de7dbb69b74467914b0ecbe28ff638" for the exported file name. this is what I'm using: D:\iMIS_Reports\Report_Export\NMC_02_${now}.pdf

Attachments

Bill Staff (602 posts)
January 18, 2017 04:01 PM
Accepted Answer

Report Commander exports to a temporary file (which is the file name that you're seeing in the log) and then renames the file to the final name. It's the rename that's failing. The reason is that the ${now} variable formats the date/time with colons, which aren't valid in a file name, so it fails with the "The given path's format is not supported" error.

To avoid this, use the now function instead of the now variable, and specify a format that doesn't contain invalid characters for a file name. For example,

@now("yyyy-MM-dd HH-mm-ss")

Replies are disabled for this topic.