Skip to content Skip to sidebar Skip to footer

How To Convert String To Date Format In Php?

I am trying to convert a date in string format to date format, here is the example 1. 15Oct15 to 2015-10-15 2. 151015 to 2015-10-15 3. 15102015 to 2015-10-15 Please help me to fi

Solution 1:

You can convert 1. 15Oct15 to 2015-10-15 using date('Y-m-d', strtotime("15Oct15"))

Not sure of other 2

Post a Comment for "How To Convert String To Date Format In Php?"