Hello,
I was wondering what was the best solution to getting a specific month from a DATETIME field from MySQL. I would like to do this in one sql call if possible.
Thanks.
Bill http://www.billvanpelt.com
You mean like "SELECT yourdatetime FROM yourtable WHERE MONTH(yourdatetime) = 07" or just fetching the month from a DATETIME field? In that case DATE_FORMAT() is your friend (e.g. DATE_FORMAT(yourdatetime, 'm'))