You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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
FormatFormats a time value using standard or custom .Net formatting stringsstring$Server.Now.Format("hh:mm")$"23:55" (given the date time "31/12/2000 23:55:333")
HourThe hour component of the timenumber

HoursAgoThe number of hours which have passed since the timenumber

MillisecondThe millisecond component of the timenumber

MinuteThe minute component of the timenumber

MinutesAgoThe number of minutes which have passed since the timenumber

SecondThe second component of the timenumber

SecondsAgoThe number of seconds which have passed since the timenumber

ToLongTimeString()The time represented in long time format. For the en-AU culture, the standard long time pattern is "h:mm:ss tt".string

ToShortTimeString()The time represented in short time format. For the en-AU culture, the standard short time pattern is "h:mm tt"string











  • No labels