get only month from datetime in php code example
Example 1: php grab month from date
$month = date("m",strtotime($mydate));
Example 2: datetime get month php
$dateTime = new DateTime();
$month = $dateTime->format('m');
$month = date("m",strtotime($mydate));
$dateTime = new DateTime();
$month = $dateTime->format('m');