O'Reilly logo

MySQL for Python by Albert Lukaszewski, PhD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required