How do I convert UK date to mySQL Date?
For example I select a date from a calender: 07/06/2011
Now I want it to conver it to YYYY-MM-DD so I can use it in the WHERE query?
STR_TO_DATE($date,'%d/%m/%Y')
$query = "SELECT STR_TO_DATE('$myDate','%d/%m/%Y') FROM MyTable";
If you want a PHP solution:
$ymd = DateTime::createFromFormat('d/m/Y', $dmy)->format('Y-m-d');