Name | Syntax | Description |
TODAY() | TODAY() | Returns today's date (year, month, day), but not the time (defaults to 00:00:00). Use the NOW() function if you need the exact time. |
NOW() | NOW() | Return today's date and time, including hours, minutes, and seconds. |
TONOW() | TONOW(date, units) | Returns the absolute difference between the current date and a specified date. |
FROMNOW() | FROMNOW(date, units) | Returns the absolute difference between the current date and a specified date. |
DATEADD() | DATEADD(date, count, units) | Adds a fixed time interval to a specified date. |
DATETIME_DIFF() | DATETIME_DIFF(date1, date2, units) | Returns the difference between two dates (with sign), i.e., date1 minus date2. |
WORKDAY() | WORKDAY(startDate, numDays, [holidays]) | Return the date after a specified number of workdays from a start date. |
WORKDAY_DIFF() | WORKDAY_DIFF(startDate, endDate, [holidays]) | Counts the number of workdays between two dates (with signs). |
IS_AFTER() | IS_AFTER(date1, date2) | Compares if date1 is later than date2; returns true if later, otherwise returns false. |
IS_BEFORE() | IS_BEFORE(date1, date2) | Compares if date1 is earlier than date2; returns true if earlier, otherwise returns false. |
IS_SAME() | IS_SAME(date1, date2, [units]) | Compares if date1 equals date2; returns true if equal, otherwise returns false. |
DATETIME_FORMAT() | DATETIME_FORMAT(date, specified_output_format) | Formats a date as text in a custom format. |
DATETIME_PARSE() | DATETIME_PARSE(date, [input_format]) | Converts text to a structured date type. |
DATESTR() | DATESTR(date) | Formats a date as "year-month-day" text (fixed format: YYYY-MM-DD). |
TIMESTR() | TIMESTR(date) | Formats a date as "hour:minute:second" text (fixed format: HH:mm:ss). |
YEAR() | YEAR(date) | Returns the four-digit year corresponding to a specified date. |
MONTH() | MONTH(date) | Returns the month corresponding to a specified date. |
WEEKDAY() | WEEKDAY(date, [startDayOfWeek]) | Returns the day of the week corresponding to a specified date. |
WEEKNUM() | WEEKNUM(date, [startDayOfWeek]) | Returns the week number of the year for a specified date. |
DAY() | DAY(date) | Returns the day of the month for a specified date, as an integer from 1 to 31. |
HOUR() | HOUR(date) | Returns the hour for a specified date, as an integer from 0 (12:00 am) to 23 (11:00 pm). |
MINUTE() | MINUTE(date) | Returns the minute for a specified date, as an integer from 0 to 59. |
SECOND() | SECOND(date) | Returns the second for a specified date, as an integer from 0 to 59. |
SET_LOCALE() | SET_LOCALE(date, locale_modifier) | Sets a specific locale for a specified date and time. |
SET_TIMEZONE() | SET_LOCALE(date, locale_modifier) | Sets a specific timezone for a specified date. |
CREATED_TIME() | CREATED_TIME() | Returns the date and time when the record was created. |
LAST_MODIFIED_TIME() | LAST_MODIFIED_TIME([{field1},{field2}, …]) | Returns the time of the last modification in a cell for each row. |