Aleix Cortadellas
A little bit of everything…
-
PHP: converting string into formatted date
While coding I came across the following situation: a date which was showed with the format YYYY-MM-DD, but I wanted its format to be DD-MM-YYYY.Obviously there’s the PHP Date function, you will think, but the point here is that the initial date was a variable as string. Therefore using directly the date function did not work…luckily it is not difficult to find out how to get the desired results.


