Results 1 to 3 of 3

Thread: [RESOLVED] Get Month Name

  1. #1

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Resolved [RESOLVED] Get Month Name

    Hi all
    Is there any best way to get month name in SQL SERVER 2005.
    I know that we can do this using our own function, but just i want to conform that if SQL SERVER provide any function for month name if we have month number i.e. 1,2..12

    Thanks

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Get Month Name

    Don't know if this works in SQL Server, but Access has a MonthName function.
    MonthName(2) returns February, MonthName (2, 1) returns Feb
    I'd guess SQL Server would have something similar.
    Tengo mas preguntas que contestas

  3. #3

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Get Month Name

    ok thanks I got solution
    Code:
    SELECT DATENAME(MONTH,'1900/' + CAST(2 AS VARCHAR(2)) + '/01')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width