Jump to content

Query month in date time stamp


dpiearcy

Recommended Posts

I'll keep this short. 

 

I need to query the anniversary month date stored in a date time stamp in MySQL.  I have a form where I can enter the month I want to query but am not sure (without a between) how to query the time stamps ONLY for the month I'm interested in retrieving. 

 

Any help?

 

Thanks in advance. 

Link to comment
https://forums.phpfreaks.com/topic/257289-query-month-in-date-time-stamp/
Share on other sites

searching for month is ambiguous, unless you want results from the same month of every year. If that's the case, you can use MySQL's MONTH() function. Otherwise, you'll need to include the year as well.

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.