How to convert string to date format in PHP

How to convert string to date format in PHP

In PHP there is an easy way to convert a string to date format. And it will work in all situation flawlessly. Problem Let’s say that we have this date in string format that we want to change to date format in PHP: $olddate = '2008-07-01T22:35:17.02'; Basic and...