On Tue,  7 Aug 2001 19:39, Chris wrote:
> I have a bunch of dates like this:
> Jul 24 2001
> Jul 31 2001
> Aug 7 2001
>
> I need to sort it from oldest to newest, but I can't devise a way that
> works. And they are text fields in MySQL so that won't sort it
> correctly either. Can anyone point me in the right direction?

Two possible ways - one is to use Mysql date functions to create a 
sortable field and order your query by that field. 

Or convert them to Unix timestamp with PHP using strtotime, then sort and 
display using date. The former would be preferable.

-- 
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  

   Taxes are not levied for the benefit of the taxed.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to