Created
January 14, 2014 16:56
-
-
Save quagliato/8421649 to your computer and use it in GitHub Desktop.
Convert BR date format to ISO 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 brDate2ISO($date){ | |
if(isset($date) && !is_null($date) && '' != $date && 10 == strlen($date)){ | |
$dtAux = substr($date, 6, 4).'-'; | |
$dtAux .= substr($date, 3, 2).'-'; | |
$dtAux .= substr($date, 0, 2); | |
$date = $dtAux; | |
} | |
return $date; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment