Skip to content

Instantly share code, notes, and snippets.

@stevenwoodson
Created December 11, 2014 17:45
Show Gist options
  • Save stevenwoodson/105f2f37d479161a8622 to your computer and use it in GitHub Desktop.
Save stevenwoodson/105f2f37d479161a8622 to your computer and use it in GitHub Desktop.
MySQL Compare timestamps
SELECT if( TIMEDIFF('2014-12-11 11:00:00','2014-12-11 11:39:30') < 0, 'older','newer')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment