Date help needed

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
gunkel
Newbie
Posts: 1
Joined: Mon Oct 03, 2005 10:14 pm
Contact:

Date help needed

Post by gunkel » Mon Oct 03, 2005 10:19 pm

Hi
I am not very familar with programming.
I want to built a macro. The job is do delete a file with the name
fileyyyymmdd.zip.

yyyymmdd is the date of yesterday.

Thanks for any help

KG
Karl Gunkel

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue Oct 04, 2005 12:33 am

There is some great help information provided with MacroScheduler that you should find helpful. Date formats can be tricky but support provided some great examples in this thread http://www.mjtnet.com/usergroup/viewtop ... =yesterday

Based on that info here's how to generate the filename you specified

VBStart
VBEnd
VBEval>Year(date()-1)&Month(date()-1)&Day(date()-1),yesterday
Let>myfile={"file"+%yesterday%+".zip"}
MessageModal>%myfile%

Once you have the filename part working then look at the "DeleteFile" command in the Help and you should be in business.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts