Getting the Current Date and Time : NOW « Date Time Functions « MySQL Tutorial






There are three functions that you can use to get the current date and time.

NOW() gets both date and time.

CURDATE() works with only the date.

CURTIME() is for the time.

mysql>
mysql> SELECT NOW();
+---------------------+
| NOW()               |
+---------------------+
| 2007-07-21 13:54:27 |
+---------------------+
1 row in set (0.00 sec)








14.32.NOW
14.32.1.Getting the Current Date and Time
14.32.2.Multiple references to a function such as NOW() within a single query always produce the same result
14.32.3.SELECT NOW(), SLEEP(2), NOW();