Run the following in phpmyadmin sql area.
1 2 3 |
UPDATE datatest set newdate=datetochange |
‘datatest’ is the tablename
newdate = date format (2013-06-23)
datetochange = varchar (23/06/2013)
This should update all the old ways of storing the date to the new format, if you have stored it wrongly!
(when testing this my data became (2030/07/22)!!!
But the better way of doing is this: –
1 2 3 4 |
UPDATE `cmdata` SET `newdate` = str_to_date( `date`, '%d/%m/%Y' ); |
Which worked
newdate was the new field with date format
date was the old varchar field