Date Functions

Date functions return a value that is either a date or a number that relates to a date.

Function

Description

Add-Days

Returns a datetime value resulting from adding a number of days to a date.

Add-Months

Returns a datetime value resulting from adding a number of months to a date.

Add-Years

Returns a datetime value resulting from adding a number of years to a date.

Age

Returns age as a day-month-year interval by subtracting a specified date from today's date.

Date-to-Days-from-1900

Returns the number of days since Jan 1, 1900 inclusive. The value returned is negative if the date is before 1900.

Day

Returns a numeric value for the day of the month from 1 to 31, from a date, datetime value, or interval.

Days-to-End-of-Month

Returns the number of days to the last day of the month from a date or datetime value.

First-of-Month

Returns the first day of the month from a date or datetime value.

Last-of-Month

Returns the last day of the month from a date or datetime value.

Month

Returns the month number as an integer from 1 to 12, from a date or datetime value.

Months-Between

Returns the number of months between two dates. If the first date is later than the second date, then the result is a negative number.

Today

Returns the current date according to the date set on your computer.

Year

Returns the year from the date.

Years-Between

Returns the number of years from one date to another date.