php retrieve year from Y-m-d date code example Example: php grab year from date $year = date("y",strtotime($mydate));