Home Sql Sqldate Mysql Time Difference Function



Mysql Time Difference Function
Posted on: January 21, 2009 at 12:00 AM
Mysql Time Difference Function is used to find the time difference between any two dates.

Mysql Time Difference Function

     

Mysql Time Difference Function is used to find the time difference between any two dates.

Understand with Example

The Tutorial describe an example that helps you to understand 'Mysql Time Difference  Function'. In this example we use TimeDiff('Year1 Time1', 'Year2 Time2') query that return you the time difference between any two consecutive dates.

TimeDiff('Year1 Time1', 'Year2 Time2') : The Query performs the time difference between any consecutive dates.

 

 

Query to Time Difference Function

mysql> SELECT TIMEDIFF('2009:01:08 00:00:00', '2008:01:01 00:00:00.000001');
+---------------------------------------------------------------+
| TIMEDIFF('2009:01:08 00:00:00', '2008:01:01 00:00:00.000001') |
+---------------------------------------------------------------+
| 8951:59:59.999999 |
+- --------------------------------------------------------------+
1 row in set (0.00 sec)

Related Tags for Mysql Time Difference Function:
sqlmysqlcdatetimefunctiondifffuniodatessedfinddifferenceifunctobetweeneuseimceinmtweenesfuncmeseeetwatanymyisimetwssrenthfefinndono


More Tutorials from this section

Ask Questions?    Discuss: Mysql Time Difference Function  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.