Jump to content

select all records of a given month


mdvignesh

Recommended Posts

Check this :

 

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format

 

something like the following should give you what you want:

 

SELECT * FROM tbl_name WHERE date_format(dt, '%m') = 3

 

Change the table name and field names accordingly.

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.