Skip to content

Instantly share code, notes, and snippets.

@ken-muturi
Created November 17, 2013 05:23
Show Gist options
  • Select an option

  • Save ken-muturi/7509643 to your computer and use it in GitHub Desktop.

Select an option

Save ken-muturi/7509643 to your computer and use it in GitHub Desktop.
MYSQL 24 hrs time check.....
SELECT DATE_FORMAT(CURRENT_TIMESTAMP(), '%H%i') AS _hour, IF ( DATE_FORMAT(CURRENT_TIMESTAMP(), '%H%i') BETWEEN 1300 AND 1600, 1, 0) AS _check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment