MySQL SYSDATE Function

Example

Return the current date and time:

SELECT SYSDATE();

Definition and Usage

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

Note: The date and time is returned as “YYYY-MM-DD HH:MM:SS” (string) or as YYYYMMDDHHMMSS (numeric).

Syntax

SYSDATE()

Continue reading MySQL SYSDATE Function

MySQL DATE Function

Example

Extract the date part:

SELECT DATE("2017-06-15");

Definition and Usage

The DATE() function extracts the date part from a datetime expression.

Syntax

DATE(expression)

Continue reading MySQL DATE Function