The date object represents a date 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 and ParametersDescriptionReturn TypeUsage Examples
DayThe day component of the dateInteger$Utils.GetDate("31/12/2000").Day$31
DayOfWeekThe name of the day of week of the date String$Utils.GetDate("31/12/2000").DayOfWeek$"Sunday"
DaysAgoThe number of days which have passed since the dateInteger$Utils.GetDate("31/12/2000").DaysAgo$6526
Format(string format)Formats a date or time value using standard or custom .Net formatting stringsString
$Utils.GetDate("31/12/2000").Format("dd MMM yyyy")$"31 Dec 2000"
MonthThe month component of the date Integer
$Utils.GetDate("31/12/2000").Month$12
ToLongDateString()The date represented in long date format. For the en-AU culture, the standard long date pattern is "dddd, d MMMM yyyy".String
$Utils.GetDate("31/12/2000").ToLongDateString()$"Sunday, 31 December 2000"
ToShortDateString()The date represented in short date format. For the en-AU culture, the standard short date pattern is "d/MM/yyyy".String
$Utils.GetDate("31/12/2000").ToShortDateString()$"31/12/2000"
YearThe year component of the date Integer$Utils.GetDate("31/12/2000").Year$2000



  • No labels