Thanks for the reply RedRum,
I did as you said but when i go to run the code in phpmyadmin it says there is a value missing in the form. Here is the code I used:
Code:update '4mmchips' set DateNew = str_to_date(Date,"%d/%m/%Y");
Am i doing something stupid!! lol
No problem. You just need to remove the quotes from the table name in your update. I just tested it and it definately works.
Code:
mysql> CREATE TABLE `4mmchips` (`DateNew` date,`Date` varchar(255)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.04 sec)
mysql> insert into 4mmchips set Date = "28/02/2013";
Query OK, 1 row affected (0.01 sec)
mysql> update 4mmchips set DateNew = str_to_date(Date,"%d/%m/%Y");
Query OK, 1 row affected (0.02 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from 4mmchips;
+------------+------------+
| DateNew | Date |
+------------+------------+
| 2013-02-28 | 28/02/2013 |
+------------+------------+
1 row in set (0.02 sec)
