Determining the Current Date or Time : CURDATE « Date Time « SQL / MySQL






Determining the Current Date or Time

     
mysql>
mysql> SELECT NOW( ), CURDATE( ), CURTIME( );
+---------------------+------------+------------+
| NOW( )              | CURDATE( ) | CURTIME( ) |
+---------------------+------------+------------+
| 2011-10-03 13:05:45 | 2011-10-03 | 13:05:45   |
+---------------------+------------+------------+
1 row in set (0.00 sec)

mysql>

   
    
    
    
    
  








Related examples in the same category

1.CURDATE(), CURRENT_DATE(), CURTIME(), CURRENT_TIME(), CURRENT_TIMESTAMP(), and NOW() Functions
2.Check current date in where clause
3.To find out what date it is, according to the server, you can use the CURRENT_DATE() function