Hi can anyone help to guide me to modify the below export script so that i can export my excel with the datestamp everytime i run it? Thank you!
i.e.
if I run it today, the output file will be 18. Duplicate Payment Month 280420.xlsx
if i run it tomorrow it will be 18. Duplicate Payment Month 290420.xlsx
Script:
Set db = Client.OpenDatabase("Check Against DatabaseM.IMD") Set task = db.ExportDatabase dbname = "Exports.ILB\18. Duplicate Payment Month.xlsx" task.IncludeAllFields eqn = "" task.PerformTask dbname , "Database", "XLSX", 1, db.Count, eqn db.Close Set db = Nothing Set task = Nothing
jaz
Offline
Last seen: 3 years 11 months ago
Joined: 04/27/2020 - 22:13
Hi Jaz,
You can use the Now() to get the current date and the Format() to format the date in the way you want. So your code would look like this.