There is a database in which about 600 entries have entries that have a publication date that someone just did not enter as horrible. As a result, in one column I have the following types of dates:
12-08-14
08/31/15
01/15/13
How would I massively bring all of them to the timestamp format? well, or at least to some one?
My fantasies:
I roughly imagine it this way: I make a selection of all records from the database - then you need to create some kind of tricky if condition (type format 12-08-14) then foreach where all the records that passed through the condition of format 1 are converted to the timestamp and the string is updated to the database. Accordingly, I run the file for execution. And so we repeat with each type of format.
Question:
Actually how to make a condition for the type of a specific date format? And how to do the conversion thereof in the timestamp?
I admit - my PHP skills are very modest, so I will be very grateful for the examples developed. Thank you for attention.