> I tend to stay away from Convert() for this problem, but
> if you prefer the string manipulation route, you should look into:
>
> Select convert(varchar(8), datetimefield, 1) as adatefield
> From yourtable Order by adatefield

The numbers may be a little off, but that's not a bad idea, and probably
significantly faster than converting dateparts to strings and then back to a
date again... afaik, the standard ODBC date format is "ts { YYYY/MM/DD
timeinfo }" so maybe
CONVERT(smalldatetime,SUBSTRING(CONVERT(varchar,datetimefield),6,10)) ... or
something to that effect... actually I'm not sure if I have the parameters
for the SUBSTRING() function in the right order... and I'm not sure how much
of a concern the possibility of the format of that date string changing
might be ...

Isaac Dealey
Certified Advanced ColdFusion Developer

www.turnkey.to
954-776-0046

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to