C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL DATE() FunctionThe date() is a MySQL date/time function. It is used to get the date from given date/datetime. Syntax
select date('expression');
Parameter:
expression: date/datetime value to be extracted. ReturnsThis function will return NULL if the expression is not a date or a datetime value. Example 1
Select date('2018-09-24');
Output:
Example 2
Select date('2018-09-24 10:51');
Output:
Next TopicMySQL date/time
|