I got this type of date from DB '10/09/19' It's today date(10th sept 2019).
$date = '10/09/19';
//DD/MM/YY
$newdate=date('Y-m-d',strtotime(str_replace('/', '-', $date)));
echo $newdate; //output 2010-09-19
exit;
It's giving me 2010-09-19. it means 19th Sept 2010.
I expect 10-09-2019(10th Sept 2019). I already tried many solutions from SO but no luck. Can anyone tell me what am I doing wrong??