get that rows, WHERE `DAYOFMONTH(<date>)` is devidable on 3?
I have a table in MYSQL DB with date
field in YYYY-mm-dd
format.
i need to get that rows, DAYOFMONTH(<date>)
is devidable on 3
.
Is it possible to do with mysql functions, or i have to wr开发者_高级运维ite multiple OR conditions? :/
Thanks
Use modulus.
Something like,
WHERE DAYOFMONTH(<date>) % 3 = 0
WHERE (DAYOFMONTH(<date>) % 3) = 0
精彩评论