Skip to main content

ISTIME

Use the ISTIME function check if a text value is recognisable as a Time.

Use​

ISTIME( value )
Returns TRUE if the value is a time.

ParameterRequiredDescription
valueYesany text value to test

ReturnsLogical

Examples​

Output Validation (Enforcing Valid Time Entry)​

You can use ISTIME in an Output Validation Formula to ensure a user has entered a valid time in a text-based capture widget before they can submit a form.

  • Scenario: A user must manually enter a "Shift Start" value into a text field on an activity form.
  • Formula: ASSERT(ISTIME(this), "The entry is not a valid time. Please use a format like 3:00 PM.").
  • Logic:
    • this: Refers to the current text value being entered by the user.
    • ISTIME(this): The function evaluates the text. If it is recognizable as a time (e.g., "14:30" or "2:30 PM"), it returns TRUE.
    • ASSERT: If ISTIME returns FALSE, the ASSERT function triggers the specific error message, preventing the user from completing the activity with invalid data.

Conditional Logic (Dynamic Form Visibility)​

In the Form Builder, you can use ISTIME within Conditional Logic to control whether a specific form element is shown or hidden based on data provided in a previous step.

  • Scenario: You want to show a "Timezone Confirmation" Content Block only if the "PreferredTime" provided in the Trigger step is a valid time string.
  • Formula (placed in the "Show when" property): ISTIME(@Trigger.out.PreferredTime).
  • Logic:
    • @Trigger.out.PreferredTime: This pulls the specific output data captured when the approval run was started.
    • Outcome: If the captured text is a valid time (e.g., "09:00"), the formula returns TRUE, and the form element becomes visible to the reviewer. If the field is blank or contains non-time text like "TBD," the function returns FALSE, and the element remains hidden.

Pro Tip: If a text value passes the ISTIME check but you need to perform calculations with it (such as adding hours), use the TIMEVALUE function to formally convert that text into a Time data type.