Support

Account

Home Forums Front-end Issues Uncaught Exception: DateTime::__construct() Reply To: Uncaught Exception: DateTime::__construct()

  • My best guess.

    
    $date = get_field('fecha_nacimiento_obituario_gratis;);
    $date1 = get_field('fecha_def_obituarios_gratis');
    $birthday = DateTime::createFromFormat('d/m/Y', $date);
    $decease = DateTime::createFromFormat('d/m/Y', $date1);
    $interval = $birthday->diff($decease);
    echo $interval->y.’ Años’;