I keep getting a question mark added to my filename

I set a variable EndDate to %ICUDateTimePlus%1%Days%MMddyy%
And then I write a file called: /Users/briandavison/Dropbox/Documents/Papers/Timecards/Exports/TimecardExport_%Variable%EndDate%.jpg

But then the file comes out as: "TimecardExport_04252020?.jpg"

I can't figure out why the question mark keeps getting added. Any ideas? Thanks!

Welcome @BrianBing!

I just tried out your "code" out of curiosity and this is what I get:

This is different to what you say you get. Notably I have just "042520" whereas you have "04252020?"

Might I suggest you check your typing for errors?

Thanks @tiffle!
The 2020 vs 20 discrepancy is because I tried a couple different year formats. However, you are absolutely correct, the issue was my typing! I accidentally had a line break while I was setting my variable and so the filename couldn't deal with that. Problem solved, thanks again!

1 Like