MySQL "between" clause not inclusive? MySQL "between" clause not inclusive? mysql mysql

MySQL "between" clause not inclusive?


From the MySQL-manual:

This is equivalent to the expression (min <= expr AND expr <= max)


The field dob probably has a time component.

To truncate it out:

select * from person where CAST(dob AS DATE) between '2011-01-01' and '2011-01-31'


The problem is that 2011-01-31 really is 2011-01-31 00:00:00. That is the beginning of the day. Everything during the day is not included.