I have a query that selects (varchar 10)dates from a database and then outputs them to html
My problem is how can I sort them by date
My format is European {day-month-year}
example these are the dates in the database
//Data
02-12-2001
31-02-2001
03-06-2001
01-07-2001
10-01-2002
if I use SQL function ORDER BY ASC
I get this,
01-07-2002
02-12-2001
03-06-2001
10-01-2002
31-02-2001
The Result I need is this
31-02-2001
03-06-2001
01-07-2002
02-12-2001
10-01-2002
I am using MSSQL SERVER 7.0 so maybe there is a function built into the database server
Thanks for your help ion advance