[thelist] SQL Chaos!!

Steve Cook steve.cook at evitbe.com
Tue Jan 28 11:12:22 CST 2003


We use something like this to format the date in a similar query...


SELECT (cast(DatePart(yyyy,bookDate) as varchar) +'-'+ RIGHT('0' +
cast(DatePart(mm,bookDate) as varchar), 2) +'-'+ RIGHT('0' +
cast(DatePart(dd,bookDate) as varchar), 2)) as Describ,

That formats the date for Swedish style format (yyyy-mm-dd) - I'm sure that
you can find a useful way of doing the same for your own use.

.steve


-------------------------------------
 Cookstour - http://www.cookstour.org
-------------------------------------

> -----Original Message-----
> From: Martyn Haigh [mailto:martyn.haigh at virgincosmetics.com]
> Sent: den 28 januari 2003 17:35
> To: 'thelist at lists.evolt.org'
> Subject: RE: [thelist] SQL Chaos!!
>
>
>
> Joshua,
>
> This is looking good - you are right in thinking that my
> DateCreated has a
> date and time portion.  I was thinking that I could somehow group by
> dateCreated using dateFormat and just separating the contents
> that way.
> Does this sound plausible?
>
> Thank you
>
> Martyn
>
> <SNIP>



More information about the thelist mailing list