Why not just write your own function to return a proper date object
based on the string of date you pass in?


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 12 July 2007 15:57
To: SQL
Subject: RE: Sort by month

Tried this, but since it is not stored as a date but varchar, datepart
will not work.

-----Original Message-----
From: Mike Hughes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 12, 2007 10:40 AM
To: SQL
Subject: Re: Sort by month

Try
In Selectstaement add
 DATEPART(dd, Birthdate) AS DayOfBirth";

OrderByStatement = "ORDER BY DayOfBirth"


On 7/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I have a table with the month stored as January, February, 
> March.....etc. How do I write a query to order by month so that 
> January is first, Feb second and so on? I'm using SQL server and
ColdFusion.
>
>
>
>
>
> 





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2870
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6

Reply via email to