strtotime for DD/MM/YYYY not working properly [duplicate]
问题 This question already has answers here : Convert one date format into another in PHP (16 answers) Date in a URL dd/mm/yyyy (1 answer) Closed 1 year ago . 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