dbQuery with condition and date_format()
condition() can only be used for simple expressions (=, &gt;, &lt;, &lt;&gt;, BETWEEN, LIKE, and a few others).

Using where() as you are already is the correct way to construct a more complex query.