Extract just the date: DATE() : DATE « Date Time « SQL / MySQL






Extract just the date: DATE()

    
mysql>
mysql>
mysql> SELECT DATE('2004-12-31 23:59:59');
+-----------------------------+
| DATE('2004-12-31 23:59:59') |
+-----------------------------+
| 2004-12-31                  |
+-----------------------------+
1 row in set (0.00 sec)

   
    
    
    
  








Related examples in the same category

1.Treating Dates or Times as Numbers
2.Synthesizing Dates or Times Using Formatting Functions
3.Synthesizing Dates or Times Using Component-Extraction Functions
4.Date-Based Sorting
5.Date-Based Summaries
6.Add an incorrect date to a special table and show the result.