Skip to main content

TODAY

Use the TODAY function to get the current date.

Use

TODAY( )
Returns the current date.


ReturnsDate

Examples

Preventing Retroactive Submissions (Output Validation)

You can use TODAY in an Output Validation formula to ensure that a user does not submit a form with a date that has already passed. This is a common requirement for scheduling requests or expense reports.

  • Scenario: A "Travel Request" trigger form includes an output field called DepartureDate. You want to ensure the user selects a date that is either today or in the future.
  • Formula: ASSERT(this >= TODAY(), "The departure date cannot be in the past.").
  • Logic:
    • this: Refers to the current value the user entered in the DepartureDate field.
    • >= TODAY(): Compares the user's input to the current system date.
  • Outcome: If the user tries to select yesterday’s date, the formula returns FALSE, and the ASSERT function displays the custom error message, preventing the form from being submitted.

Calculating Duration or Tenure (Variable Update)

You can use TODAY in a Variable Update formula to calculate the number of days between a specific event and the current moment.

  • Scenario: When a "New Hire Onboarding" approval reaches a specific activity, you want to calculate how many days have passed since the employee's ContractSignedDate to update a variable called $DaysSinceSigning.
  • Formula: DAYS(TODAY(), @Trigger.out.ContractSignedDate).
  • Logic:
    • TODAY(): Serves as the end_date parameter for the calculation.
    • @Trigger.out.ContractSignedDate: Pulls the original date from the trigger output.
  • Outcome: The DAYS function subtracts the start date from the current date and returns a Number, which is then stored in the variable for use in later steps or reporting.