$myDate = date('m-d-Y 00:00:00', strtotime($myDate));
if($debugs)echo"<br>myDate is: $myDate in line: ".__line__."<br>";
$mysqlstart = date('Y-m-d 00:00:00', strtotime($myDate));
if($debugs)echo"<br>mysqlstart is: $mysqlstart in line: ".__line__."<br>";
From the code above, I would like to show $myDate to the audience while passing $mysqlstart into a query.
When I echo my query, the month is in the date spot and the date is in the month spot so instead of getting $mysqlstart as '2023-03-10', I get an output of '2023-10-03'. Very odd.
I tried the above code expecting the date and month to switch for sql purposes but it exchanges the month and date in the incorrect pattern.