Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Dynamic Dates - Amazon Marketing Cloud Insights on AWS

Dynamic Dates

This solution provides the following four functions that enable the creation of dynamic dates based on an offset value. By using these functions, you can create scheduled report ranges adaptive, as they are evaluated at request time. This means that when a scheduled report is generated, the functions produce different dates each time, resulting in a more dynamic and up-to-date report.

  1. NOW(): Returns the current date and time.

  2. TODAY(): Returns the current date, with the ability to specify a number of days as an offset.

  3. LASTDAYOFOFFSETMONTH(): Returns the last day of the previous month, with the ability to specify a number of months as an offset.

  4. FIRSTDAYOFOFFSETMONTH(): Returns the first day of the month, with the ability to specify a number of months as an offset.

  5. FIFTEENTHDAYOFOFFSETMONTH(): Returns the 15th day of the month, with the ability to specify a number of months as an offset.

For example, TODAY(-1) means one day before the current date, while FIFTEENTHDAYOFOFFSETMONTH(5) means the 15th day of the month, 5 months from the current month.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.