I have access to a set of date and times as so dd/mm/yy hh:mm so as an example 15/05/24 14:00, I am trying to set this to be an input for mySql DateTime format, however when I do it the system thinks the first number is the year not the last number.
Can I tell PHP that the initial date input was dd/mm/yy?
I have this setup to create the format for the DateTime but as I say its output is putting the first number as the year not the last.
$strtime[] = date("Y-m-d H:i:s", strtotime(str_replace('/', '-',$time)));
DateTime::createFromFormat(), which allows you to specify the format of the input.