dcsimg
 

Submitted by: M S Sridhar(sridhar.ms@gmail.com)

Monday Dec 3rd 2018 by M S Sridhar

Language: SQL, Expertise: Intermediate - Learn how to use the NOW() function in MySQL to get the current time and date.

MySQL provides a NOW() function that returns the current date and time when executed.

Command:

SELECT NOW() AS 'CURRENT DATE AND TIME';

Expected output:

+-------------------------+
|CURRENT DATE AND TIME    |
+-------------------------+
|    2018-03-20 19:22:17  |
+-------------------------+ 
Home
Mobile Site | Full Site