SQL Server - DATENAME(MONTH,GETADATE()) is returning numeric value of the month as ‘09’

Asked By Praful K
30-Sep-09 09:41 AM

Hi,

When I run the following query [SELECT DATENAME(MONTH,GETDATE())], ideally speaking it should return value as 'September' but its returning value as '09'. I am running this query on MS SQL Server 2005. Is there anything I need to configure with MS SQL Server 2005? My requirement is to get month name, if not by DATENAME is there any way to get the name of the month?

 

Please find the details of the SQL Server 2005

 

Component Name                                Version

--------------------------------------------------------------------

Microsoft SQL Server Management Studio           9.00.1399.00

Microsoft Analysis Services Client Tools      2005.090.1399.00

Microsoft Data Access Components (MDAC)       2000.086.3959.00 (srv03_sp2_rtm.070216-1710)

Microsoft MSXML                                               2.6 3.0 4.0 5.0 6.0

Microsoft Internet Explorer                               6.0.3790.3959

Microsoft .NET Framework                               2.0.50727.42

Operating System                                           5.2.3790

  Jonathan VH replied to Praful K
30-Sep-09 10:11 AM

It sounds as though the language is Asian.  Japanese, Korean, and Simplified Chinese all display months like that.

What do you get when you execute this statement?

SELECT @@LANGUAGE;

Here's a short script to see the effects of the language:

SET LANGUAGE N'Japanese';
SELECT DATENAME(m,GETDATE());
SET LANGUAGE 'us_english';
SELECT DATENAME(m,GETDATE());

To see the possibilities:

EXEC sp_helplanguage;

The Japanese and Korean languages return the month in digits.  The Japanese and Korean languages return the month in digits.

30-Sep-09 10:29 AM
However, before you execute your datename script, you can set the language to US English

Like,
SET LANGUAGE us_english
SELECT DATENAME(month,GETDATE())

Create New Account
help
I added the right permissions on the content type. Then, I created a column "external data" in Sharepoint that I linked to my content type. When I want to change the data in this column in a list , for example, an error says: An error occurred when retrieving data " name of the database ." For more information administrators can view the server log . Can you tell me where is the problem ? Find attached the log file. Thanks 11 / 13 / 2011 00:08:30.31 w3wp.exe (0x1D9C) 0x1038 SharePoint Foundation Logging Correlation Data xmnv Medium Name = Request (GET:http: / / tricoflex:80 / CRM / _layouts / FldNewEx.aspx?List = %7B4E776DA0%2D583C%2D40C3%2D8F91%2DBBE615D5295B%7D&FieldTypeParam = BusinessData&DisplayNameParam = Cust%2E%20Relation%20ID 11 / 13 / 2011 00:08:30.32 w3wp.exe (0x1D9C) 0x1038 SharePoint Foundation Logging Correlation Data xmnv Medium Site = / 9694064f-e307-4c5d-b470-c4351e5dff53 11 / 13 / 2011 00:08:30.35
choosen the Blog post from here This means the installation should be on a single server as Domain Controller , as MS SQL database server and as MOSS2007 server farm. Only one uses should be used. Thats what I have done, I followed the site, but it seems I am not allowed to login, althoug SPTEST \ spadmin has full access rights to all webapplications. The red message saying, that the SP installation has not been mistake, but currently I am reading the logfiles placed under "c: \ program files \ common files \ microsoft shared \ web server extensions \ 12 \ logs". I don't find any relavant information regarding authentication or what else 13:53:11.35 OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Database 880i High System.Data.SqlClient.SqlException: Die von der Anmeldung angeforderte 'SharePoint_07_Config'-Datenbank kann nicht geöffnet werden. Fehler bei
Error while installing SQL 2005 on Win 2003 Server Hi, I have installed Win 2003 Server standard edition to work with MOSS 2007. When i tried to install SQL server 2005, it is throwing error like "Your Operating system does not meet service pack requirement for this SQL server for this release." Can any one direct me, which version of Win 2003 Service
In sql 2005 row_number function not working i try to assign row number but i got an error like :- Msg 195, Level 15, State 10, Line 1 'row_number' is not a recognized function name. AND my sql config are given below:- Microsoft SQL Server Management Studio Express 9.00.2047.00 Microsoft Data Access Components (MDAC) 6.1.7600.16385