Created
January 14, 2014 16:57
-
-
Save quagliato/8421669 to your computer and use it in GitHub Desktop.
Convert ISO date format to BR date format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function ISO2brDate($date){ | |
if(isset($date) && !is_null($date) && '' != $date && 10 == strlen($date)){ | |
$dtAux = substr($date, 8, 2).'/'; | |
$dtAux .= substr($date, 5, 2).'/'; | |
$dtAux .= substr($date, 0, 4); | |
$date = $dtAux; | |
} | |
return $date; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment