dpiearcy Posted February 19, 2012 Share Posted February 19, 2012 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 More sharing options...
Pikachu2000 Posted February 19, 2012 Share Posted February 19, 2012 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. Link to comment https://forums.phpfreaks.com/topic/257289-query-month-in-date-time-stamp/#findComment-1318821 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.