2017-03-17 1 views

Répondre

0

Après quelques Essais j'ai trouvé une solution

str_replace('/', '-',$date) 
0
/* 
You got August because you provide wrong format to this function. Function accept m/d/y and you provide d/m/y. you can try with this format m/d/y 
or 
you can try this with DateTime object. 
*/ 
$date = "08/03/2017"; 
$dateObject = DateTime::createFromFormat('d/m/Y', $date); 
echo $dateObject->format('d M Y');