Updated on 2024-11-11 GMT+08:00

Date and Time Functions

Table 1 Date and time functions

MySQL

Support Unplanned ALT (Yes/No)

ADDDATE()

Supported

ADDTIME()

Supported

CONVERT_TZ()

Supported

CURDATE()

Supported

CURRENT_DATE()/CURRENT_DATE

Supported

CURRENT_TIME()/CURRENT_TIME

Supported

CURRENT_TIMESTAMP()/CURRENT_TIMESTAMP

Supported

CURTIME()

Supported

DATE()

Supported

DATE_ADD()

Supported

DATE_FORMAT()

Supported

DATE_SUB()

Supported

DATEDIFF()

Supported

DAY()

Supported

DAYNAME()

Supported

DAYOFMONTH()

Supported

DAYOFWEEK()

Supported

DAYOFYEAR()

Supported

EXTRACT()

Supported

FROM_DAYS()

Supported

FROM_UNIXTIME()

Supported

GET_FORMAT()

Supported

HOUR()

Supported

LAST_DAY()

Supported

LOCALTIME()/LOCALTIME

Supported

LOCALTIMESTAMP/LOCALTIMESTAMP()

Supported

MAKEDATE()

Supported

MAKETIME()

Supported

MICROSECOND()

Supported

MINUTE()

Supported

MONTH()

Supported

MONTHNAME()

Supported

NOW()

Supported

PERIOD_ADD()

Supported

PERIOD_DIFF()

Supported

QUARTER()

Supported

SEC_TO_TIME()

Supported

SECOND()

Supported

STR_TO_DATE()

Supported

SUBDATE()

Supported

SUBTIME()

Supported

SYSDATE()

Supported

TIME()

Supported

TIME_FORMAT()

Supported

TIME_TO_SEC()

Supported

TIMEDIFF()

Supported

TIMESTAMP()

Supported

TIMESTAMPADD()

Supported

TIMESTAMPDIFF()

Supported

TO_DAYS()

Supported

TO_SECONDS()

Supported

UNIX_TIMESTAMP()

Supported

UTC_DATE()

Supported

UTC_TIME()

Supported

UTC_TIMESTAMP()

Supported

WEEK()

Supported

WEEKDAY()

Supported

WEEKOFYEAR()

Supported

YEAR()

Supported

YEARWEEK()

Supported