Getting confused about converting string format dates/datetimes for adding to MySQL table.
I have linked a JQuery datetime picker to text fields in the PHP/HTML code, and the dates in the fields are formatted as UK format dd/mm/yyyyy and dd/mm/yyyy hh:ss (e.g. “25/12/2020” and “25/12/2020 11:59”) .
After the form post
$dt =$_POST[“accdatetime”];
$d=$_POST[“accdate”]
$d now = “25/12/2020” and $dt = “25/12/2020 11:59”
which is what I expect to see.
How do I convert those two values into a format allows $dt to be inserted into a MySQL Datetime column and $d into a Date column?