Incorrect output while renaming .pdf file


expression used - FileName.Replace(“.pdf”, Now.ToString(“_yyyy_MM_dd” + “.pdf”)) in Assign activity.

Hello,

Please put the +.pdf outside the brackets that’s used for getting the date. Like this:
FileName.Replace(“.pdf”, Now.ToString(“_yyyy_MM_dd”)+“.pdf”)

Thanks!
Athira

1 Like

Great catch. It’s using the df in .pdf as the day of month (d) and tenths of a second (f) in the ToString format.

1 Like

I didn’t knew that. Thanks for the info :slight_smile:

thank you @athira.somasekharan and @postwick!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.