Skip to main content

I’m trying to setup a scheduled Zap to run at the beginning of the month, but download a file from the previous month.  I’m attempting to manipulate the date from the Scheduler by using Date/Time formatter to subtract 30 days from the date the schedule ran, so I can get the proper Month and Year of the previous month.  Notice that I have to use the date so I can tell if the year flipped over or not.  I can’t just subtract 1 from the month and use the same year.

However, the Date/Time formatter doesn’t allow me to access all of the segments of the date individually.  Also I cannot specify my own customer output format to create something like M,YYYY and then split that using utilities.

So how can I have something run on 1/5/2021 but have available to the rest of my Zap that last month was 12 and last month’s year was 2020?  I need month and year separate so I can insert them into a Query String of a URL.

 

Hi @gspence 

You can use the ‘Custom’ option to specify the desired output format from the Formatter > Date/Time > Format.

 

Example

 


Thank you, for some reason I missed that when clicking Custom, it changed the dropdown to a textbox, because it still popped up the “Search” window.  This worked as expected.

I assume the next step is that I have to use the Utility step to split the Month and Year into two fields?  I wasn’t sure if there was an easier way than this multi-step process.  Or I guess I could use the Date/Time step twice, once to get the previous month and once for the previous year.