Date and time functions

MySQL's time-related functions are used to manipulate date and time data types. As such, they are very helpful tools for accessing data with optimum speed and minimal overhead.

The MySQL list of date and time-related functions are legion. The full list is contained in the table below (Source: MySQL 5.5 Reference Manual):

Name

Description

ADDDATE()

Add time values (intervals) to a date value

ADDTIME()

Add time

CONVERT_TZ()

Convert from one time zone to another

CURDATE()

Return the current date

CURRENT_DATE(),CURRENT_DATE

Synonyms for CURDATE()

CURRENT_TIME(),CURRENT_TIME

Synonyms for CURTIME()

CURRENT_TIMESTAMP(),CURRENT_TIMESTAMP

Synonyms for NOW()

CURTIME()

Return the current time

DATE_ADD()

Add time ...

Get MySQL for Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.