MySQL CURRENT_TIMESTAMP Function

Example

Return the current date and time:

SELECT CURRENT_TIMESTAMP();

Definition and Usage

The CURRENT_TIMESTAMP() 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.uuuuuu (numeric). Continue reading MySQL CURRENT_TIMESTAMP Function

MySQL CURRENT_TIME Function

Example

Return current time:

SELECT CURRENT_TIME();

Definition and Usage

The CURRENT_TIME() function returns the current time.

Note: The time is returned as “HH-MM-SS” (string) or as HHMMSS.uuuuuu (numeric).

Continue reading MySQL CURRENT_TIME Function