A MySql database I am working with stores dates like 11/18/2010 (varchar type).

Can I arrange this in order?

Would be great if they were timestamp, but they're not.

r937
—
2010-11-18T14:04:37Z —
#2

ORDER BY STR_TO_DATE(thedate,'%d/%m/%Y')

IBazz
—
2010-11-19T03:04:38Z —
#3

or, I think, make another column called date_name (or however is appropriate, without using the reserved word 'date'), and store them as a date or datetime column. then in your server-side language convert the date to ISO format , yyy/mm/dd and store it that way.

Once it's done for all your exisiting records, you could remove the current column. Doing it this way (iso) can make date comparisons more efficieint, I think. (subject to confirmation from someone more knowledgable ).

r937
—
2010-11-19T03:07:28Z —
#4

IBazz said:

Doing it this way (iso) can make date comparisons more efficieint, I think.