EU and US manage dates with different formats,
in PHP you can convert the date format from European style to US style using DateTime::createFromFormat

It is the right way to do the job, but surfing on the web I found an alternative way that helps me when I have to prepare a field to store into a MySql database.

The code is simple and self-explanatory, anyway it explodes the source string in substrings containing dd mm and yy then reverses the order of the elements of the array and, last, rebuilds the string using the minus sign as separator.


You can find the source of this tip at this link