![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
i have two SQL queries: SELECT column_name FROM table_name WHERE column_name >= '2010-07-01 00:00:00' SELECT column_name FROM table_name WHERE column_name >= '2010-07-01' the former returns dates starting at 2010-07-02 whereas the latter returns dates starting at 2010-07-01. my question is... why aren't they doing the same thing? if anything i would have expected the second one to be the one that wasn't returning 2010-07-02 - not the first one. Anyone who compares a date in textual format using an arithmetical |
#3
| ||||
| ||||
|
|
i have two SQL queries: SELECT column_name FROM table_name WHERE column_name >= '2010-07-01 00:00:00' SELECT column_name FROM table_name WHERE column_name >= '2010-07-01' the former returns dates starting at 2010-07-02 whereas the latter returns dates starting at 2010-07-01. my question is... why aren't they doing the same thing? if anything i would have expected the second one to be the one that wasn't returning 2010-07-02 - not the first one. |
|
@@version | +-----------+ 5.1.47 | +-----------+ |
|
c | +------------+ 2010-07-01 | 2010-07-02 | +------------+ |
|
c | +------------+ 2010-07-01 | 2010-07-02 | +------------+ |
#4
| |||
| |||
|
|
i have two SQL queries: SELECT column_name FROM table_name WHERE column_name >= '2010-07-01 00:00:00' SELECT column_name FROM table_name WHERE column_name >= '2010-07-01' the former returns dates starting at 2010-07-02 whereas the latter returns dates starting at 2010-07-01. my question is... why aren't they doing the same thing? if anything i would have expected the second one to be the one that wasn't returning 2010-07-02 - not the first one. |
![]() |
| Thread Tools | |
| Display Modes | |
| |