Saturday, February 25, 2012

date format

How do I format a date to display as 'dd month yyyy'? ex. '31 October 2004'
ThanksAll formatting should be done client side.
I have a functions in VBscript to format dates, numbers and currency.
Since my pages support French and English,
of course the functions return values depending on user language.
Then I just: response.write formatDateLong(date(), french)
"Arul" <Arul@.discussions.microsoft.com> wrote in message
news:BC460844-A8DC-4502-A2D5-39C3448A6F56@.microsoft.com...
> How do I format a date to display as 'dd month yyyy'? ex. '31 October
> 2004'
> Thanks|||as Raymond mentioned, formating should be done in client app but if you
really wanted to do this in the DB then it would be something like this...
declare @.inDate datetime
set @.indate = '04/30/2004'
select convert(varchar,datepart(dd, @.indate)) + ' '+
datename(mm, @.indate) + ' ' +
convert(varchar,datename(yyyy, @.indate) )
Message posted via http://www.webservertalk.com

No comments:

Post a Comment