Connecting Tech Pros Worldwide Help | Site Map

Date time Diff

Member
 
Join Date: Jul 2007
Posts: 37
#1: Aug 4 '09
Hai All,
I wanted to know how can i get the difference between two Timestamp using some function in mysql and write a query.
For eg:i have from date time = 01/01/2008 01:00:00
to date time = 01/05/2008 19:00:00
result is = 4 months 18 hrs
How do i get the difference i wanted that in year,days,hours,min?
mwasif's Avatar
Moderator
 
Join Date: Jul 2006
Location: Pakistan
Posts: 718
#2: Aug 4 '09

re: Date time Diff


Use TIMEDIFF() function to calculate the difference.
Reply