SECOND
Use the SECOND function to return the seconds of a time value. The second is given as a number, ranging from 0 to 59.
Use
SECOND( time )
Returns the seconds of a time or date/time value.
| Parameter | Required | Description |
|---|---|---|
| time | Yes | the time or date/time that contains the seconds to return |
| Returns | Number |
Examples
Generating High-Precision Audit Logs (Variable Update)
In highly regulated environments, you may need to record the exact second an approval was granted to distinguish between simultaneous actions. You can use SECOND in a Variable Update formula to capture this data point.
- Scenario: A financial approval requires an audit trail that includes the exact second of the final manager's sign-off.
- Formula:
SECOND(@ManagerReview.prop.CompletedOn). - Logic:
@ManagerReview.prop.CompletedOn: This system property retrieves the full date and time the activity was finished.- Result: If the activity was completed at 02:07:45 PM, the function returns 45. This numeric value can then be stored in a variable like
$AuditSecondfor reporting.
Creating Time-Sensitive Reference Numbers (Input Mapping)
You can use the SECOND function to help create a unique reference string for a request by incorporating the second of submission. This is useful for avoiding duplicate IDs in high-volume triggers.
- Scenario: A "Help Desk" trigger needs to generate a temporary "Session ID" for the user. You want the ID to include the second the form was submitted.
- Formula:
CONCAT("SES-", SECOND(@Trigger.prop.SubmittedOn)). - Logic:
@Trigger.prop.SubmittedOn: This property identifies the exact moment the trigger form was submitted.CONCAT(...): This joins the prefix "SES-" with the extracted second.- Result: If the form is submitted at 10:15:22 AM, the generated ID would be "SES-22".