Mega Code Archive
The CONVERT() function allows you to convert dates in the same way as the CAST() function
mysql>
CONVERT(, )
mysql>
mysql> SELECT CONVERT(20041031, DATE);
+-------------------------+
| CONVERT(20041031, DATE) |
+-------------------------+
| 2004-10-31 |
+-------------------------+
1 row in set (0.00 sec)
mysql>