Re: [PHP] sorting dates with php

2005-12-21 Thread Chris Lott
On 12/21/05, Ross <[EMAIL PROTECTED]> wrote: > Hi, > > Have a load of dates in the format DD/MM/YY. Thet are stored as a VARCHAR on > a mysql DB. Couldn't you use cast() to cast the values first? Something like (untested): SELECT CAST(doc_date AS DATE) FROM papers ORDER BY doc_date DESC c -- PH

Re: [PHP] sorting dates with php

2005-12-21 Thread André Medeiros
You COULD sort them if the date was stored backwards, ie. Year/Month/Day On 12/21/05, Jim Moseby <[EMAIL PROTECTED]> wrote: > > Have a load of dates in the format DD/MM/YY. Thet are stored > > as a VARCHAR on > > a mysql DB. > > > > I need a way to sort them into order(most recent first) > > > > >