🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Macro to adjust date on input file

User: "Melissa_21551"
New Altair Community Member
Updated by Melissa_21551

I am using the Monarch Server Automator version 14.1 to run a process.  This process uses a project that looks for an import file with naming that looks like this:

 

OTD.DRAFT.TAPE1801042204 

the numbers are the 2 digit year-month-day-time. 18-year 01-month 04-day 2204-time   I have the project set to look for:

 

OTD.DRAFT.TAPE&[yy]&[mm]&[dd]*  this allows it to pick up a file that matches todays date.

 

What I need is it to pick up a file with yesterdays date.  I have tried adjusting the macros by -1 from each

 

OTD.DRAFT.TAPE&[yy-d]&[mm-d]&[dd-d]*    This ended up working but picked up everyday before today that was in the file

 

I also tied just -1 on the day  OTD.DRAFT.TAPE&[yy]&[mm]&[dd-1]*  This picked up everyday before today that is in the same month and year

 

How can I adjust the macro to only pick up yesterdays file?  I do need to take into consideration that on 01-01-19 I need to pick up 12-31-18

 

Thank you!

Find more posts tagged with