You can try this:
print replace(CONVERT(CHAR(10),getdate(),101),'/','')
fyi: it should be char(10) instead of char(8) in your convert function
Regards,
Huong Huong
From: "Andrews, Daryl" <[Email Address Removed] "LazyDBA.com Discussion" <[Email Address Removed] Date Styles
Date: Thu, 29 Jan 2004 15:54:39 -0500
MIME-Version: 1.0
Received: from www.websitesondatabases.com ([216.234.186.193]) by
mc12-f25.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Thu, 29 Jan 2004
17:27:40 -0800
Received: (qmail 28895 invoked by uid 121); 29 Jan 2004 21:11:24 -0000
Received: (qmail 28876 invoked from network); 29 Jan 2004 21:11:23 -0000
X-Message-Info: 6sSXyD95QpUd24OyXs1fLW2B8R5av3tL
Mailing-List: contact mssqldba-[Email Address Removed] run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:[Email Address Removed] <mailto:mssqldba-[Email Address Removed] <mailto:mssqldba-[Email Address Removed] <mailto:mssqldba-[Email Address Removed] mailing list [Email Address Removed] <[Email Address Removed] Internet Mail Service (5.5.2655.55)
Return-Path: mssqldba-return-4365-fenfen78=hotmail.[Email Address Removed] 30 Jan 2004 01:27:40.0733 (UTC)
FILETIME=[4090E6D0:01C3E6D0]
I'm trying to create a date string of MMDDYYYY. There is no standard
"style" that I can find for this. However, I can get MM/DD/YYYY,
CONVERT (CHAR(8),L.CURRENTDATE,101)
but can't seem to put the "replace" statement in the right place to pull out
the "/". Any ideas?
Thanks!
Daryl
_________________________________________________________________
Download the latest MSN Messenger http://messenger.msn.com.my
MS Sql Server LazyDBA home page