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 Parameters | Description | Return Type | Usage Examples | |
|---|---|---|---|---|
| Day | The day component of the date | Integer | $Utils.GetDate("31/12/2000").Day$ | 31 |
| DayOfWeek | The name of the day of week of the date | String | $Utils.GetDate("31/12/2000").DayOfWeek$ | "Sunday" |
| DaysAgo | The number of days which have passed since the date | Integer | $Utils.GetDate("31/12/2000").DaysAgo$ | 6526 |
| Format(string format) | Formats a date or time value using standard or custom.Net formatting strings | String | $Utils.GetDate("31/12/2000").Format("dd MMM yyyy")$ | "31 Dec 2000" |
| Month | The 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" |
| Year | The year component of the date | Integer | $Utils.GetDate("31/12/2000").Year$ | 2000 |