51黑料不打烊

Date Time Functions date-time

Date and time functions are used to perform date and time operations on values within Journey Optimizer.

Add Days add-days

The addDays function adjusts a given date by a specified number of days, using positive values to increment and negative values to decrement.

Syntax

{%= addDays(date, number) %}
Example
  • Input: {%= addDays(stringToDate("2024-11-01T17:19:51Z"),10) %}
  • Output: 2024-11-11T17:19:51Z

Add Hours add-hours

The addHours function adjusts a given date by a specified number of hours, using positive values to increment and negative values to decrement.

Syntax

{%= addHours(date, number) %}
Example
  • Input: {%= addHours(stringToDate("2024-11-01T17:19:51Z"),1) %}
  • Output: 2024-11-01T18:19:51