Skip to content

Instantly share code, notes, and snippets.

@mrpunkin
Created December 20, 2012 03:04
Show Gist options
  • Select an option

  • Save mrpunkin/4342616 to your computer and use it in GitHub Desktop.

Select an option

Save mrpunkin/4342616 to your computer and use it in GitHub Desktop.
TIMESTAMPDIFF(HOUR, '2012-08-30 22:13:31', "2012-12-19 19:04:37") -- Gives me 2660
time_to_sec(timediff("2012-12-19 19:04:37", '2012-08-30 22:13:31'))/3600 -- Gives me 838.9997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment