Skip to main content

ISDATE

Use the ISDATE function check if a text value is recognisable as a Date.

Use​

ISDATE( value )
Returns TRUE if the value is a date.

ParameterRequiredDescription
valueYesany text value to test

ReturnsLogical

Examples​

Validation Logic (Ensuring Correct Text Input)​

You can use ISDATE in an Output Validation Formula to check a text field where a user is expected to manually type a date (for example, if a specific legacy format is being captured in a text widget).

  • Scenario: A user must enter a "Renewal Date" into a text field. You want to prevent the form from being submitted if the text is not a valid date.
  • Formula: ASSERT(ISDATE(this), "The value entered is not a valid date format.")
  • Logic:
    • this: Refers to the text value currently being entered in the field.
    • ISDATE(this): Analyzes the text to see if it matches a recognizable date pattern.
    • ASSERT: If the function returns FALSE, GoApprove stops the submission and displays the custom error message.

Conditional Logic (Dynamic Form Visibility)​

In the Form Builder, you can use ISDATE within Conditional Logic to show or hide elements based on whether a previously provided piece of text is a valid date.

  • Scenario: You have a "Service Detail" Content Block that should only appear if the "LastServiceDate" provided in the trigger step is a valid date string.
  • Formula: ISDATE(@Trigger.out.LastServiceDate)
  • Logic:
    • @Trigger.out...: This pulls the specific text output from the trigger form.
    • Show when: This formula is entered into the "Show when" property of the Content Block.
    • Result: If the captured string is "2024-12-25", the function returns TRUE and the block is shown. If the string is "Unknown" or left blank, it returns FALSE and the block remains hidden.

Pro Tip: If you have a value that passes the ISDATE check but is still stored as text, you should use the DATEVALUE function to convert it into a formal Date data type before performing arithmetic, such as calculating the difference between two dates.