The time object represents a time value and includes properties and functions to extract numbers, and functions to convert to a string representation. Note that the local time value and formatting output is based on the timezone and regional settings of the server or agent where the expression is evaluated.
| Name | Description | Return Type | Usage Examples | |
|---|---|---|---|---|
| Format(string format) | Formats a time value using standard or custom.Net formatting strings | String | $Utils.GetTime("23:55:33.222").Format("hh:mm")$ | "11:55" | 
| Hour | The hour component of the time | Integer | $Utils.GetTime("23:55:33.222").Hour$ | 23 | 
| HoursAgo | The number of hours which have passed since the time | Integer | $Utils.GetTime("23:55:33.222").HoursAgo$ | 16 | 
| Millisecond | The millisecond component of the time | Integer | $Utils.GetTime("23:55:33.222").Millisecond$ | 222 | 
| Minute | The minute component of the time | Integer | $Utils.GetTime("23:55:33.222").Minute$ | 55 | 
| MinutesAgo | The number of minutes which have passed since the time | Integer | $Utils.GetTime("23:55:33.222").MinutesAgo$ | 983 | 
| Second | The second component of the time | Integer | $Utils.GetTime("23:55:33.222").Second$ | 33 | 
| SecondsAgo | The number of seconds which have passed since the time | Integer | $Utils.GetTime("23:55:33.222").SecondsAgo$ | 59037 | 
| ToLongTimeString() | The time represented in long time format. For the en-AU culture, the standard long time pattern is "h:mm:ss tt". | String | $Utils.GetTime("23:55:33.222").ToLongTimeString()$ | "23:55:33" | 
| ToShortTimeString() | The time represented in short time format. For the en-AU culture, the standard short time pattern is "h:mm tt" | String | $Utils.GetTime("23:55:33.222").ToShortTimeString()$ | "23:55" |