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)

Solarwinds
Previous Post
SQL SERVER – Recompiling InMemory OLTP with SQL Server 2016
Next Post
Interview Question of the Week #050 – Query to Retrieve Second Highest Salary of Employee

Related Posts

Leave a Reply

Menu