Function to get a DateTime variable of last month to the day

Trying to determine how to make a variable of type DateTime that will always be 1 month before the day of the interaction.

Use Case:
Setup Email routing to be the last user the customer emailed to get delivered back to via skill based routing.

I have a data action that takes a 1 month interval of time that it can pull from but, I need a way to have a variable that represents last month. I don't seem to be able to figure out how to create one using what is available.

Are you calling this data action from Architect? If so, something like one of these two expressions may work for you:
AddMonths(GetCurrentDateTimeUtc(), -1)
AddDays(GetCurrentDateTimeUtc(), -30)

--Jason

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.