Re: change date format

From: Steve Kass (skass_at_drew.edu)
Date: 11/21/04


Date: Sun, 21 Nov 2004 11:09:46 -0500

Hugo's solution needs format 3, not 103:

This should work:

REPLACE (CONVERT(char(8), TrnDate, 3), '/', '')

Steve Kass
Drew University

Newbie wrote:

>Thanks for the reply. I gave it a go but for the date 17/04/2000 it
>returned
>
>170420 instead of
>
>170400
>
>
>"Hugo Kornelis" <hugo@pe_NO_rFact.in_SPAM_fo> wrote in message
>news:55ivp01419rdl6enh9v0lolt1cak6a5r14@4ax.com...
>
>
>>On Sat, 20 Nov 2004 21:57:21 -0000, Newbie wrote:
>>
>>
>>
>>>I have done it like as follows: Is there a better way of doing it?
>>>
>>>
>>Hi Newbie,
>>
>>Have you tried
>>REPLACE (CONVERT(char(8), TrnDate, 103), '/', '')
>>
>>
>>Best, Hugo
>>--
>>
>>(Remove _NO_ and _SPAM_ to get my e-mail address)
>>
>>
>
>
>
>