MySQL DATE() Function
MySQL Date Functions
Definition and Usage
The DATE() function extracts the date part of a date or date/time expression.
Syntax
Where date is a valid date expression.
Example
Assume we have the following "Orders" table:
OrderId |
ProductName |
OrderDate |
1 |
Jarlsberg Cheese |
2008-11-11 13:23:44.657 |
The following SELECT statement:
SELECT ProductName, DATE(OrderDate) AS OrderDate
FROM Orders
WHERE OrderId=1
|
will result in this:
ProductName | OrderDate |
Jarlsberg Cheese | 2008-11-11 |
MySQL Date Functions
The Altova MissionKit is a suite of intelligent XML tools, including:
XMLSpy® – industry-leading XML editor
- Support for all XML-based technologies
- Graphical editing views, powerful debuggers, code generation, & more
MapForce® – graphical data mapping tool
- Drag-and-drop data conversion with code generation
- Support for XML, DBs, EDI, Excel® 2007, text, Web services
StyleVision® – visual stylesheet designer
- Drag-and-drop stylesheet design for XML & databases
- Output to HTML, PDF, RTF, Word 2007, & more
And more…
Try before you buy with a free fully functional 30-day trial
Download today
|