Creation with the date_create_from_format() function:
<?php
$date 
"06/08/04";
$obj DateTime::createFromFormat'!d/m/y'$date )->formatDateTime::ISO8601 );
?>
Parsing with the date_parse_from_format() function:
<?php
$date 
"06/08/04";
print_rdate_parse_from_format'!y*d*m'$date ) );
?>
Example:
Pattern String Y M D
!y*d*m 06/08/04 false false false
!y*d*m 06/08/04 1970 01 01
!y*d*m 06/08/04 2006 01 01
!y*d*m 06/08/04 2006 01 01
!y*d*m 06/08/04 2006 01 08
!y*d*m 06/08/04 2006 01 08
!y*d*m 06/08/04 2006 04 08
!y*d*m 06/08/04 2006 04 08