how to extract date time year from php vairable code example Example: php grab year from date $year = date("y",strtotime($mydate));