Javatpoint Logo
Javatpoint Logo

MySQL Date/Time timediff() Function

The timediff() is a MySQL date/time function. It is used to get the difference from given two time/datetime.

Syntax

Parameter:

time1, time2: time values to get the difference

Returns:

This function returns the difference between two time/datetime values.

Example 1

Output:


MySQL Datetime timediff() Function

Example 2

Output:


MySQL Datetime timediff() Function
Next TopicMySQL datetime




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA