May 15, 2021 MySQL
The DATE() function extracts the date portion of the date or date/time expression.
The date argument is a legitimate date expression.
Let's say we have the following "Orders" table:
OrderId | ProductName | OrderDate |
---|---|---|
1 | Jarlsberg Cheese | 2008-11-11 13:23:44.657 |
Here's the SELECT statement:
The result is as follows:
ProductName | OrderDate |
---|---|
Jarlsberg Cheese | 2008-11-11 |