Home » MySQL DATEDIFF() Function

MySQL DATEDIFF() Function

by Online Tutorials Library

MySQL DATEDIFF() Function

The datediff() is a MySQL date/time function. It is used to get the difference between two date values.

Syntax

Parameter:

date1 & date2 : date’s for calculating the difference.

Returns

This function returns the difference in days between two date values.

Example 1

Output:

MySQL DATEDIFF() Function

Example 2

Output:

MySQL DATEDIFF() Function

Next TopicMySQL date/time

You may also like