What is the best way to convert a string to time in php?
547
I have a MySQL table containing date and time in one of its column as text (15/05/2018 11:05:40). I want to convert this string to DateTime format so that it can be used to fetch data based on the date in PHP.
Answer
Solution:
Use DateTime::createFromFormat