This question already has an answer here:
- Convert one date format into another in PHP 15 answers
I have a SQL table imported from an CSV excel sheet with PHP. The import wasn't optimized to detect dates and create column type Date while creating the table which now has a 'varchar' column with dates like 7-Feb, 8-Feb etc. But now I do not have the excel sheet to change the format there and re import. So I need to convert the data in the imported database from the 7-Feb format to yyyy-mm-dd for all rows. The reason being, if I change the column type from 'Varchar' to 'Date'now, the string is not recognized and becomes 0000-00-00. And I lose my information. So I have to change the varchar string to date format before changing the column type.
Is this possible with php ?
</div>