The DATE() function extracts the date part from a datetime expression.
DATE(
expression)
Parameter | Description |
---|---|
expression | Required. A valid date/datetime value. Returns NULL if expression is not a date or a datetime |
Works in: | From MySQL 4.0 |
---|
Extract the date part (will return NULL):
SELECT DATE("The date is 2017-06-15");
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!