Get month of a given date which is stored in a PHP time variable in \'Y-m-d\' format
Try date_parse_from_format():
$date = "2010-08-12"; $d = date_parse_from_format("Y-m-d", $date); echo $d["month"];