My input date format is dd/mm/yy. I am using the following code to convert it into yyyy-mm-dd.
$cal_date= $fileop[1];
$date = str_replace('/', '-', $cal_date);
$invdate=date('Y-m-d',strtotime($date));
Result i got is 24/10/13-->2024-10-13. Can anyone correct me.
Here two conversions 2digit year to 4 digit year and /replaced by -dash