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.


NameDescriptionReturn TypeUsage Examples
Format(string format)Formats a time value using standard or custom .Net formatting stringsString$Utils.GetTime("23:55:33.222").Format("hh:mm")$"11:55"
HourThe hour component of the timeInteger$Utils.GetTime("23:55:33.222").Hour$23
HoursAgoThe number of hours which have passed since the timeInteger
$Utils.GetTime("23:55:33.222").HoursAgo$16
MillisecondThe millisecond component of the timeInteger
$Utils.GetTime("23:55:33.222").Millisecond$222
MinuteThe minute component of the timeInteger
$Utils.GetTime("23:55:33.222").Minute$55
MinutesAgoThe number of minutes which have passed since the timeInteger
$Utils.GetTime("23:55:33.222").MinutesAgo$983
SecondThe second component of the timeInteger
$Utils.GetTime("23:55:33.222").Second$33
SecondsAgoThe number of seconds which have passed since the timeInteger
$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"



  • No labels