I am having difficulty converting a date string passed via JSON into a PHP formatted date which I can use in date calculations and store in DATETIME format in MySQL.
$passedTime = "30/3/2020 17:7:23:847";
I'm looking to convert to the following format:
$convertedPassedTime = "2020-3-30 17:07:23";
I have tried several different combinations of 'DateTime::createFromFormat' but keep coming across errors. I cannot change the format of the incoming data as it comes from an old RFID reader device.