Date section-overview

The Date functions in Adobe Journey Optimizer empower you to work seamlessly with time-related data, helping you create dynamic expressions based on the current time, past intervals, or future projections. Whether you need to evaluate if an event occurred within specific hours, days, or years, or adjust time zones and set custom date components, these tools offer precise control over temporal data. Each function, like ‘currentTimeInMillis,’ ‘inLastDays,’ or ‘updateTimeZone,’ serves a unique purpose, enabling you to build personalized journeys and automate decisions with confidence. Explore the subtopics to discover their distinct roles and how they fit together to streamline your workflows.

Date Functions in Adobe Journey Optimizer

icon

currentTimeInMillis Function Reference

Learn how to use the ‘currentTimeInMillis’ function to retrieve the current time in epoch milliseconds.

Read about currentTimeInMillis

icon

inLastDays Function

Understand the ‘inLastDays’ function, which checks if a given date falls within a specified number of days before today.

Learn about inLastDays

icon

Using the inLastHours Function

Explore the ‘inLastHours’ function to determine if a date-time falls within the last specified number of hours.

Read about inLastHours

icon

Using the inLastMonths Function

Check if a date falls within a specified range of months using ‘inLastMonths’ in Adobe Journey Optimizer.

Learn about inLastMonths

icon

Using the inLastYears Function

Learn how to use the ‘inLastYears’ function to evaluate if a date is within a specified number of years before now.

Explore inLastYears

icon

inNextDays Function

Learn how to check if a date falls within a specified range of days from today using the ‘inNextDays’ function.

Discover inNextDays

Additional Resources

  • inNextHours Function - Understand how to use the ‘inNextHours’ function to evaluate if a date-time is within the next specified hours.
  • inNextMonths Function Reference - Explore the ‘inNextMonths’ function to check if a date is within the next specified range of months.
  • inNextYears Function - Determine if a date falls within a specified range of years in the future using the ‘inNextYears’ function.
  • Using the ‘now’ Function - Learn about the ‘now’ function to retrieve the current date and time, with optional time zone support.
  • Using the nowWithDelta Function - Explore the ‘nowWithDelta’ function to calculate the current date-time with an offset.
  • setHours Function - Modify the hour component of a date-time value using the ‘setHours’ function.
  • setDays Function - Learn how to change the day component of a date-time object using the ‘setDays’ function.
  • updateTimeZone Function - Adjust a date-time value to a new time zone with the ‘updateTimeZone’ function.
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76