Date time Diff

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crs27
    New Member
    • Jul 2007
    • 40

    Date time Diff

    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
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Use TIMEDIFF() function to calculate the difference.

    Comment

    Working...