Hey there,

I'm pretty sure that you would need to have your date field stored as
type date and not varchar... as it would seem to me that MySQL would
sort varchar fields as strings (always)...

The only way except converting your dates to type date would be to
somehow get CF to convert them...

Just a quick 2 cents..

Yves


On Tue, 14 Dec 2004 10:16:03 -0500, Mike <[EMAIL PROTECTED]> wrote:
> A little background:
> 
> Last year I wrote a template for my work to log inbound phone calls.
> Its pretty simple, just a web form that takes a date (in the format of
> MM-DD-YY), and a few call related numbers.
> 
> Then I display the output in a table using
> 
> SELECT * FROM `abandon` order by DATE  (I have date stored in mysql as
> a varchar)
> 
> Now, the problem is when we first started there wasn't that many
> entries.  Now that we're seeing some of the same dates in 04 as we had
> in 03 the ORDER BY DATE isn't sorting them accuratly.
> 
> For example:
> 
> 10-22-03
> 10-22-04
> 10-23-03
> 10-23-04
> 10-24-03
> 10-24-04
> 10-25-03
> 10-25-04
> 
> Any ideas?  I considered converting the VARCHAR to DATE, but MYSql
> doesn't seem to convert all of the dates correctly..  :(
> 
> -Mike
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187543
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to