Skip to main content

DATE

Use the DATE function to create a date from year, month, and day values, which can be literals, fields, or formulas that return Number values.

Use

DATE( year, month, day )
Create a date from the year, month and day.

ParameterRequiredDescription
yearYesthe value of the year
monthYesthe value of the month from 1 to 12
dayYesthe value of the day of the month from 1 to 31

ReturnsDate

Examples

Validation Logic (Restricting Dates to a Specific Range)

In this scenario, you use the DATE function within an Output Validation Formula to ensure that a user enters a date that is not earlier than a specific company milestone, such as the start of the current fiscal year.

  • Scenario: A user must enter a "Project Start Date" that is on or after January 1, 2024.
  • Formula: this >= DATE(2024, 1, 1)
  • Explanation:
    • this: Refers to the date value the user is currently entering in the form field.
    • DATE(2024, 1, 1): Creates a literal Date object representing January 1, 2024, from the provided numbers.
    • The comparison operator (>=) ensures the formula returns TRUE only if the entered date is the milestone date or later.

Input Mapping (Combining Numeric Fields into a Date)

This formula is used for Input Mapping when a trigger step captures date components as separate numerical inputs (often from external sources or legacy forms) and you need to combine them into a single Date data type for use in an Activity step.

  • Scenario: A trigger captures three separate numbers: StartYear, StartMonth, and StartDay. You need to map these to a single "EventDate" input for a reviewer.
  • Formula: DATE(@Trigger.out.StartYear, @Trigger.out.StartMonth, @Trigger.out.StartDay)
  • Explanation:
    • @Trigger.out...: These references pull the individual numerical outputs produced by the trigger step.
    • DATE(...): The function takes these three dynamic values and assembles them into a single Date value. This ensures that the reviewer sees a properly formatted date (e.g., "25/11/2021") rather than three disconnected numbers.