Excerpt | ||
---|---|---|
| ||
Return an element of the date, for example the year, month or day. |
...
Syntax
dateGet(date, dateField)
Argument | Type | Description |
---|---|---|
date | Date | The original date/time |
dateField | Date Field | The part of the date to be be returned (e.g. the month or seconds) |
Examples
Example | Returns |
---|---|
dateGet("20190925",_DAY_OF_WEEK) | the day of the week as a number (where Monday is 1). This date is a Wednesday, so it returns 3 . |
dateGet(now(),_YEAR) | the current year in the format yyyy . |
dateGet("20100403.162359",_MONTH) | the month as a number, 4 . |