Created
June 3, 2015 11:51
-
-
Save kauhat/f42e0a25d0ea39996d6a to your computer and use it in GitHub Desktop.
MySQL - Date compare with formatting
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 *, STR_TO_DATE(application.completed, '%m-%d-%y') AS `dateCompleted` | |
FROM `web244-newassess`.application | |
WHERE | |
completed | |
HAVING | |
(dateCompleted BETWEEN '2013-04-01' AND '2015-04-01') | |
ORDER BY dateCompleted; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment