Thought i would add this option as well.

select
'MyDate'=
Cast(DatePart(mm,DBDate) as varchar(2))+'/'+
Cast(DatePart(dd,DBDate) as varchar(2))+'/'+
Cast(DatePart(YYYY,DBDate) as varchar(4))
from tableName

Joe
Certified Advanced ColdFusion Developer
[EMAIL PROTECTED]

-----Original Message-----
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 8:05 PM
To: CF-Talk
Subject: RE: SQL Question: Selecting and grouping by date


> Convert(varchar(8), datefield, 1)

> Changes the internal representation of datetime data to:
> mm/dd/yy format (8 characters) which can be dangerous
> for data that spans centuries. ;)

Like a timeline of human history? :)

> You were thinking of the ODBC string representation of
> datetime data which is not applicable in this case since
> the execution plan is compiled and executed on MS SQL
> Server side (and not at the ODBC layer).

Ahh... okay, that's good to know, thanks. :)

Isaac Dealey
Certified Advanced ColdFusion Developer

www.turnkey.to
954-776-0046


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to