Skip to content

Instantly share code, notes, and snippets.

@jrmadsen67
Created March 7, 2013 04:11
Show Gist options
  • Save jrmadsen67/5105520 to your computer and use it in GitHub Desktop.
Save jrmadsen67/5105520 to your computer and use it in GitHub Desktop.
Get occurrences of a particular month, when using Unix timestamps in your db php construction of sql, but recreate as needed. $month & $year are integers
WHERE MONTH(FROM_UNIXTIME(cdate)) = '.$month.' AND YEAR(FROM_UNIXTIME(cdate)) = '. $year;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment