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. Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.