SecondsToTime
Converts a number of seconds to the equivalent duration in the form dd:hh:mm:ss.
Syntax
SecondsToTime(value)
Enabled For
For a description of the business object categories, see Notes on "Enabled For".
Business Object Category | Yes/No |
---|---|
Business Rules: Before-Save Rules | Yes |
Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load) | Yes |
Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load) | Yes |
Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load) | Yes |
Business Rules: Editing Rules | Yes1 |
Business Rules: Initialization Rules | Yes |
Business Rules: Read Only Rules | No |
Business Rules: Required Rules | Yes1 |
Business Rules: Validation Rules | Yes1 |
Client Expressions | No |
Object Permissions | No |
Services | Yes |
LDAP | Yes |
Mobile | Yes |
Quick Actions (except UI Quick Actions) | Yes |
UI Quick Actions | No |
Reports | Yes |
Search/Dashboard without field references | Yes |
Search/Dashboard with field references | No |
1. Except when this field appears on a form or is triggered by such a field. |
Parameters
Parameter | Description |
---|---|
value | The number of seconds to be converted. |
Return Value
Text value in the following format dd:hh:mm:ss. For example, 06:06:55:58.
•For durations less than one day, the dd: is omitted.
•For durations less than one hour, the hh: is also omitted.
•For durations less than one minute, the mm: is also omitted.
Example
To find the difference between the created date and time and the last modified date and time, use the following example:
$(SecondsToTime(DiffSeconds(CreatedDateTime, LastModDateTime)))
In this example, the DiffSeconds() function is used to compute the difference in seconds between the value of the CreatedDateTime and LastModDateTime times. The function then converts the seconds to a text value in the dd:hh:mm:ss format. Note that DiffSeconds takes the older datetime first.