SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software Kodyaz SQL Server and T-SQL Development Tutorials
Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Windows, Windows Phone, SAP and ABAP, like SAP UI5, Screen Personas, etc.




download SQL Server 2016
download SQL Server 2014
download SQL Server 2012



Get Day Names and Month Names in Different Language

Set Language SQL command and DateName built-in SQL datetime function enables developers to get day names and month names in specific language. In this T-SQL tutorial, SQL developers and SQL Server database administrators can find code samples to get descriptions like day names of a week or month names of a year in previously selected language like a translation on SQL Server.

SQL developers can use following T-SQL statements including "Set Language" for setting a specific language which the day and month names will be automatically translated into. SQL DateName datetime function is used to return text descriptions of months or week days in SQL Server database development.

SET LANGUAGE US_English
SELECT DATENAME(dw, GETDATE()) day, DATENAME(mm, GETDATE()) month

SET LANGUAGE Turkish
SELECT DATENAME(dw, GETDATE()) day, DATENAME(mm, GETDATE()) month

SET LANGUAGE French
SELECT DATENAME(dw, GETDATE()) day, DATENAME(mm, GETDATE()) month

SET LANGUAGE German
SELECT DATENAME(dw, GETDATE()) day, DATENAME(mm, GETDATE()) month

SET LANGUAGE Italian
SELECT DATENAME(dw, GETDATE()) day, DATENAME(mm, GETDATE()) month

SET LANGUAGE Russian
SELECT DATENAME(dw, GETDATE()) day, DATENAME(mm, GETDATE()) month

SQL Select with Set Language for day and month name translations
SQL Select with Set Language for day and month name translations

The output of the above Select statements are as seen in below screenshot.

day and month names using DateName and Set Language SQL commands
Day names and month names in selected languages by SQL Server built-in DateName() datetime function







Related SQL Resources

SQL Server Articles

SQL Server 2012

SQL Server Tools

SQL Blog

SQL Server 2008 Blog

Certification Exams Blog

Reporting Services Blog

Analysis Services Blog

MS SQL Server Forums







Copyright © 2004 - 2017 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems