- time: documentation ( source)
- print_r: documentation ( source)
<?php
$fecha = new StdClass;
$fecha->innertext = '25/08/2012';
$eventDate = DateTime::createFromFormat('d/m/Y', $fecha->innertext);
if ( false===$eventDate ) {
die('invalid date format');
}
echo $eventDate->format('Y-m-d');
echo print_r($eventDate);
echo "\n";
echo time();