TIMEVALUE
The TIMEVALUE function converts a time that is stored as Text into a Time value.
Use
TIMEVALUE( text )
Create a time from the text value.
| Parameter | Required | Description |
|---|---|---|
| text | Yes | the text that represents a time in local format |
| Returns | Time |
Examples
Converting User-Entered Text into a Step Deadline
In an Activity Step property formula, you can use TIMEVALUE to turn a text-based input from a trigger into a functional time for a system property like ExpireOn or DueOn.
- Scenario: A "Rush Order" trigger form includes a text field where the user types a specific "Cutoff Time" (e.g., "14:30:00"). To ensure the next activity actually expires at that moment, the text must be converted to a Time data type.
- Formula:
TIMEVALUE(@Trigger.out.CutoffTimeText) - Logic:
@Trigger.out.CutoffTimeText: Pulls the text string "14:30:00" from the trigger output.- Conversion: TIMEVALUE transforms that string into a Time value that the system can use to set the
ExpireOnproperty.
- Outcome: The activity will now correctly expire at 2:30 PM based on the user's text entry.
Creating a Fixed Date/Time Stamp for Auditing
You can use TIMEVALUE within a Variable Update formula to initialize or update a variable with a specific, combined date and time.
- Scenario: You want to set a "System Start" variable ($SystemStart) to a specific fixed moment: November 25, 2021, at exactly 3:00 PM.
- Formula:
DATEVALUE("25/11/2021") + TIMEVALUE("15:00:00") - Logic:
DATEVALUE: Converts the date text into a Date object.TIMEVALUE: Converts the time text "15:00:00" into a Time object.+Operator: In GoApprove, the arithmetic plus sign can join a Date and Time into a single Date/Time value.
- Outcome: The variable
$SystemStartis updated to the precise value of 25/11/2021 3:00 PM.
Pro Tip: TIMEVALUE relies on the Default Time Pattern set in the Regional Settings of your account. This pattern is a regular expression that the system uses to "check and extract" the hour, minute, and second from your text string. If your text does not match the expected local format, the function may not recognize it as a valid time.