Hi friends, in this article I will explain about How to Display DateTime Formats in
Different Languages using SQL Server.
I already explained in the previous articles about How to Calculate Age from Date Of Birth using SQL Server, How to encrypt/decrypt string in sql server and How to get second-highest salary employees in a table,Find 2nd highest salary in SQL server, SQL Query for second maximum salary from employee table
The output of above code as shown in the below figure.
I already explained in the previous articles about How to Calculate Age from Date Of Birth using SQL Server, How to encrypt/decrypt string in sql server and How to get second-highest salary employees in a table,Find 2nd highest salary in SQL server, SQL Query for second maximum salary from employee table
You can get the list of languages
support in SQL SERVER by using below Query
select * from
sys.syslanguages
|
We can set the languages as shown in the below in code.
SET LANGUAGE English
SELECT DATENAME(DW, GETDATE()) AS 'DAY Name in English'
SET LANGUAGE Polish
SELECT DATENAME(M, GETDATE()) AS 'Month Name in Polski'
SET LANGUAGE Italian
SELECT DATENAME(DW , GETDATE()) AS 'DayName in Italian'
SET LANGUAGE ROMANIAN
SELECT DATENAME(M, GETDATE()) AS 'Month Name in Romanian'
SET LANGUAGE THAI
SELECT DATENAME (DW,GETDATE()) AS 'DAYNAME in THAI'
GO
|
The output of above code as shown in the below figure.
No comments:
Post a Comment