Jump to content

how to select current month


vin_akleh

Recommended Posts

Although I'd really recommend storing dates and times in YYYY-MM-DD HH:MM:SS format in s a DATETIME field, this should do what you're asking:

 

SELECT field FROM table WHERE MONTH(FROM_UNIXTIME(date)) = MONTH(CURDATE())

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.