November 23, 2010 at 11:48 pm
Dear All,
I have a query. Is there any function what returns me the char value of month. i mean, i want Jan instead of 1. when i use Month(getdate()) function it returns int value.
thanks,
Pramod
November 23, 2010 at 11:57 pm
pramod_yg (11/23/2010)
Dear All,I have a query. Is there any function what returns me the char value of month. i mean, i want Jan instead of 1. when i use Month(getdate()) function it returns int value.
thanks,
Pramod
select DATENAME(MONTH,GETDATE())
--------------------------------------------------------------------------------------------------
I am just an another naive wannabe DBA trying to learn SQL Server
November 24, 2010 at 12:00 am
Thanks Sachin. This one is totally new to me 🙂
November 24, 2010 at 12:04 am
pramod_yg (11/24/2010)
Thanks Sachin. This one is totally new to me 🙂
You are welcome:-).Just incase you need to get weekday names you can replace month with weekday.
select DATENAME(WEEKDAY,GETDATE())
--------------------------------------------------------------------------------------------------
I am just an another naive wannabe DBA trying to learn SQL Server
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply