Question: My Queries looks like this

```
WHERE `Project`.`user_id` = 9 
  AND `Project`.`project_status` = 1 
  AND `Project`.`project_type_id` = 4
  AND `Project`.`approval_date` >= '01/08/2012' 
  AND `Project`.`approval_date` <= '01/12/2012'

```

I do have a record that matches this criteria, I actually created the query based on one of the records but it does not return. I really do not want to use the `BETWEEN` because the application can either use start date or end date

Answer: 
You should convert '01/08/2012' and '01/12/2012' to MySQL date/time values using [STR\_TO\_DATE()](http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_str-to-date)

e.g.

```
STR_TO_DATE('01/08/2012', '%d/%m/%Y')

```
Well that's really only part of the query -- any, "between" works differently than you imply - here's an excerpt from the MySQL manual:

> 
> •expr BETWEEN min AND max If expr is greater than or equal to min and
>  expr is less than or equal to max, BETWEEN returns 1, otherwise it
>  returns 0. This is equivalent to the expression (min <= expr AND expr
>  <= max) if all the arguments are of the same type. Otherwise type
>  conversion takes place according to the rules described in Section
>  11.2, “Type Conversion in Expression Evaluation”, but applied to all the three arguments.
> 
> 
> 

All that aside what is the datatype of the "approval\_date" column?