Using Today's Date in API Endpoint URL

Hello, I’m working on an Enrich With API step where I want to pull the last x days of information.

The API asks for a StartDate and EndDate parameters. Is there a secret to setting these as Today and Today minus x?

Thanks,
Chris

Hi @Chris_Myers - Happy to help! You could use an Add date and time step to add the current date and a date offset a few days from the current date. That will create two columns that can then be referenced in the parameter section of the Enrich with API step using curly brackets:

StartDate= {current date column name}

Thanks Emory! That worked great for today’s date.

I couldn’t figure out how to offset 14 days into the past (-14 and 14 both seemed to pull in a future date), so I checked out another question that lead to me to a solution involving changing the date to Unix and then subtracting seconds.