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
Post a Comment