Format Date of a query

0

I have an sql query in which I get dates ... I give this format but I get the error

---- 
Fatal error: Call to a member function format() on null in...

My code is:

$FechaInicio = $fila2[FechaInicio]->format('Y-m-d');
    
asked by Pedro185 09.11.2018 в 17:02
source

1 answer

0

Another option could be:

$FechaInicio = date('Y-m-d',$fila2['FechaInicio']);

Referral link

    
answered by 09.11.2018 в 17:33