Learn more about the date and time functions DATETIME, DATE, SECONDS, SECONDS_BETWEEN, MINUTES, MINUTES_BETWEEN, HOURS, HOURS_BETWEEN, DAYS, DAYS_BETWEEN, WORKINGDAYS, WORKINGDAYS_BETWEEN, WEEKS, WEEKS_BETWEEN, MONTHS, MONTHS_BETWEEN, YEARS, YEARS_BETWEEN, BETWEEN, YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TODAY, NOW, WEEKNUMBER, DAYOFWEEK.
Function | Description |
---|---|
DATETIME | Creates a dateTime value out of integers. |
DATE | Creates a date value out of integers. |
ADD PERIOD TO DATE | Calculates a new date by adding a specified period to a specified date. |
ADD PERIOD TO DATETIME | Calculates a new dateTime by adding a specified period to a specified dateTime. |
SUBTRACT PERIOD FROM DATE | Calculates a new date by subtracting a specified period from a specified date. |
SUBTRACT PERIOD FROM DATETIME | Calculates a new dateTime by subtracting a specified period from a specified dateTime. |
PERIOD BETWEEN | Calculates the period between two date or dateTime objects. |
Calculates the working days between two date or dateTime objects. | |
WORKINGDAYS_BETWEEN | Alternative notation for WORKINGDAYS BETWEEN. |
Returns the year of a date or dateTime value. | |
MONTH | Returns the month of a date or dateTime value. |
DAY | Returns the day of a date or dateTime value. |
HOUR | Returns the hour of a dateTime value. |
MINUTE | Returns the minute of a dateTime value. |
SECOND | Returns the second of a dateTime value. |
TODAY | Returns the current date of the server. |
NOW | Returns the current date and time of the server. |
WEEKNUMBER | Returns the week number within the year of a given date or dateTime value. |
DAYOFWEEK | Returns the number of the day within the week of a given date or dateTime value. |