THE WORLD'S LARGEST WEB DEVELOPER SITE

MySQL SYSDATE() Function

❮ MySQL Functions

Example

Return the current date and time:

SELECT SYSDATE();
Try it Yourself »

Definition and Usage

The SYSDATE() function returns the current date and time.

Note: This function returns the current date and time as a "YYYY-MM-DD HH:MM:SS" format if used in a string context, and as a YYYYMMDDHHMMSS format if used in a numeric context.

Syntax

SYSDATE()

Technical Details

Works in: MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

More Examples

Example

Return the current date and time + 1:

SELECT SYSDATE() + 1;
Try it Yourself »

❮ MySQL Functions