mysql> select str_to_date('Wednesday, 21 July 2010 20:41:51', '%W, %d %M %Y %T');
+--------------------------------------------------------------------+
| str_to_date('Wednesday, 21 July 2010 20:41:51', '%W, %d %M %Y %T') |
+--------------------------------------------------------------------+
| 2010-07-21 20:41:51 |
+--------------------------------------------------------------------+
str_to_date
Don't reinvent the wheel, stored the column in date-time
alter table your_table add column new_date_time datetime;
update your_table set new_date_time=str_to_date(date_time, '%W, %d %M %Y %T');
alter table channge column date_time ditch_date_time varchar(255);
alter table channge column new_date_time date_time datetime;
To get max value
select max(date_time) from your_table;
If you like to keep varchar
(good luck with that)
select max(str_to_date(date_time, '%W, %d %M %Y %T')) from your_table;