date - extract month from mysql -


how can extract month sql query in mysql. date format follows: dd/mm/yyyy.

month(datecol) = $month // not work. 

however if change date format yyyy-mm-dd works, not option.

you can parse date in format sql date value str_to_date. example:

select month(str_to_date('25/07/2013', '%d/%m/%y')); 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -