Current Date/Time

now()

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2012-12-07 15:38:03 |
+---------------------+
1 row in set (0.00 sec)

 

current_date() or curdate()

mysql> select current_date();
+----------------+
| current_date() |
+----------------+
| 2012-12-07     |
+----------------+
1 row in set (0.00 sec)

 

current_time() or curtime()

mysql> select curtime();
+----------------+
| curtime() |
+----------------+
| 15:38:24       |
+----------------+
1 row in set (0.00 sec)

Leave a Reply