Created
April 13, 2011 09:37
-
-
Save holysugar/917272 to your computer and use it in GitHub Desktop.
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
mysql> SELECT CAST('2011-03-31' AS DATE) BETWEEN '2011-02-28 15:00:00' AND '2011-03-30 15:00:00'; | |
+------------------------------------------------------------------------------------+ | |
| CAST('2011-03-31' AS DATE) BETWEEN '2011-02-28 15:00:00' AND '2011-03-30 15:00:00' | | |
+------------------------------------------------------------------------------------+ | |
| 0 | | |
+------------------------------------------------------------------------------------+ | |
1 row in set (0.00 sec) | |
mysql> SELECT CAST('2011-03-31' AS DATE) BETWEEN '2011-03-01' AND '2011-03-31'; | |
+------------------------------------------------------------------+ | |
| CAST('2011-03-31' AS DATE) BETWEEN '2011-03-01' AND '2011-03-31' | | |
+------------------------------------------------------------------+ | |
| 1 | | |
+------------------------------------------------------------------+ | |
1 row in set (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment