Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

NOW

Example

Retrieve the current date and time.

SELECT NOW();

Definition and Usage

The NOW() function retrieves the current date and time.

Please note that the date and time are returned in either “YYYY-MM-DD HH-MM-SS” (string) or YYYYMMDDHHMMSS.uuuuuu (numeric) format.

Syntax

NOW()

Technical Details

Works in:

 From MySQL version 4.0

More Examples

Example

Retrieve the current date and time incremented by 1 unit.

SELECT NOW() + 1;