MySQL – Date and Time Related System Functions

MySQL supports lot of functions to get current date and time. The following are some of the system functions.

There are two functions to get current date

SELECT curdate(),current_date();

There are two functions to get current time

SELECT curtime(),current_time();

There are two functions to get current date along with time

SELECT now(),current_timestamp();
SELECT utc_date();
SELECT utc_time();
SELECT utc_timestamp();

Reference: Pinal Dave (https://blog.sqlauthority.com)

Exit mobile version