Home > Expression Operators > Date Operators

Date Operators

Click on an operator to learn more:

 

12/31/1992 example of a date constant (December 31, 1992)
3y2m15d example of a duration (3 years, 2 months, 15 days)
#DATE Returns the each date at which hours or salary are calculated.
_DT Displays dates in mm/dd/yyyy format.
#DATEMINUS Subtracts a duration from a date
#DATEPLUS Adds a duration to a date
#MONTHDIF Returns the number of months between two dates; may be fractional.
#YEARDIF Returns the number of years between two dates; may be fractional.
#DAY Extracts the day from a date.
#MONTH Extracts the month from a date.
#YEAR Extracts the year (4 digits) from a date.
#BEGMTH Returns the date of the first day of the month in which Date falls.
#ENDMTH Returns the date of the last day of the month in which Date falls.
#NEXTBEGMTH Returns the date of the first day of the month coincident with or next following Date.
#MONTHROUND Rounds a date to the start of an n-month period.
#DAYOFWEEK The day of the week, as an integer, for the date evaluated.
#DAYSINMTH Number of days in the month containing the date evaluated.
#FSTBUSDAY The first business day of the period, as a date, containing the date evaluated.
#LSTBUSDAY The last business day of the period, as a date, containing the date evaluated.
#INLEAPYR
Returns 1 if a date is in a leap year (i.e., the year contains the leap day, 2/29) or 0 if the date is in a non-leap year.