Adding todays date to file name in a procedure


#1

Saveas “Sample (”+datepattern (today, “MM-DD-YYYY”)+")"

This is one that I have tried


#2

Make that

Saveas “Sample (”+datepattern(today(), “MM-DD-YYYY”)+")"

The way you have written it, Panorama will be looking for a field or variable named today, expecting it to contain the date in question. today() is a function that returns today’s date.

There also shouldn’t be any space between datepattern and the parenthesis.


#3

And if you use a reversed date pattern, the alphabetical order in the Finder will be analog to the chronological order.

Saveas “Sample (”+datepattern(today(), “YYYY-MM-DD”)+")"

#4

Can I do that with yesterdays date? -1 somewhere?


#5

Yes. Dates are just numbers. You can do any kind of arithmetic you like. Yesterday’s date would just be

today()-1

#6

Ok working fine. Thank you