real quick!

zimu

Diamond Member
Jun 15, 2001
6,209
0
0
I know this should be in the programming forum, but i need a response really fast!

in PHP/ MySQL, how do you build a query around a field in a database that is in date format (yyyy-mm-dd), but say only select this month?

like say select * from database where month = thismonth?
 

StageLeft

No Lifer
Sep 29, 2000
70,150
5
0
Dunno if mysql has it, but in sql server you could use the DATEDIFF function, where the date in DB is a difference of this month to a degree of 0, and you can plug in the parameters, like days, or in this case you'd want months as one. Do a search on that if mysql has it and nobody else answers :D