SyntaxFix
Write A Post
Hire A Developer
Questions
Assuming you have the date as a string (sorry it was unclear from your question if that is the case) could split the string on the - characters like so:
$date = "2068-06-15"; $split_date = split("-", $date); $year = $split_date[0];