14. 32. 1. Getting the Current Date and Time |
|
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)
|
|