Converting string to Date and DateTime
solution 1. Use strtotime() on your first date then date(‘Y-m-d’) to convert it back: Note: There is a difference between using forward slash / and hyphen – in the strtotime() function. solution 2 Observe the difference between m/d/Y and m-d-Y formats. PHP considers / to mean m/d/Y and – to mean d-m-Y. I would explicitly describe the input format in this case: https://stackoverflow.com/questions/6238992/converting-string-to-date-and-datetime