I have an SQL timestamp field and I need to group it by month like
Jan, Feb, Mar, … but in numbers (01, 02, 03, …)
I’ve tried
GROUP BY DATE_FORMAT(i.push_date, '%Y-%m')
But it’s not working.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try to use the Month() method.
what you get back will be the month in number form. You might to group by month and year which would be:
Date/Time Functions for MySql