I have a column called dispatchdate
It is currently storing dates as a string (varchar) format.
It stores it as e.g. 16/07/2013
How can I convert all my data in into date format without editing them all one by one?
A possible solution
UPDATE Table1
SET dispatchdate = DATE_FORMAT(STR_TO_DATE(dispatchdate, '%d/%m/%Y'), '%Y-%m-%d');
ALTER TABLE Table1
CHANGE dispatchdate dispatchdate date;
Here is SQLFiddle demo
DATE_FORMAT(dispatchdate, '%d-%m-%Y') for that
%d/%m/%Yinstead of%d-%m-%Y. And no need for the PHP code -- use a plain old MySQL client!