Created
January 22, 2014 22:46
-
-
Save matthewpoer/8568948 to your computer and use it in GitHub Desktop.
sub some field for the date string I supplied (in both places). Copied from http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#c4985
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select date_sub('2014-01-22', interval dayofweek('2014-01-22')-1 day) as week_start_sunday; | |
select date_sub('2014-01-22', interval dayofweek('2014-01-22')-2 day) as week_start_monday; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment