C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL DATEDIFF() FunctionThe datediff() is a MySQL date/time function. It is used to get the difference between two date values. Syntaxselect datediff(date1, date2); Parameter:date1 & date2 : date's for calculating the difference. ReturnsThis function returns the difference in days between two date values. Example 1Select datediff('2018-09-10','2018-09-10'); Output: Example 2Select datediff('2018-09-10','2018-09-10'); Output:
Next TopicMySQL date/time
|