Re: sorting dates with php

From: Date: Wed, 21 Dec 2005 21:47:37 +0000
Subject: Re: sorting dates with php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-227786@lists.php.net to get a copy of this message
On 12/21/05, Ross <ross@aztechost.com> 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

« previous php.general (#227786) next »