Click here to Skip to main content
15,890,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I want to apply spanish dateformat for my database not for all databases in sql server.For the remaining databases i have to maintain US-english date format.
How can we do this without effecting other databases.

Thanks in advance.

What I have tried:

I run the following command,it changes default language to "spanish", but it is applying to all databases,
-------------------
use master

EXEC sp_defaultlanguage 'sa', 'Spanish'
GO
---------------------------
Posted
Updated 23-Feb-16 23:51pm
Comments
Sascha Lefèvre 24-Feb-16 4:54am    
Do you store dates as strings?
[no name] 24-Feb-16 5:26am    
Currently what is datatype of date column which you are going to store spanish date?

1 solution

Open SSMS, and try this
SQL
SET LANGUAGE SPANISH;

SELECT GETDATE()
DBCC USEROPTIONS

SET LANGUAGE 'us_english';

SELECT GETDATE()
DBCC USEROPTIONS


Update
SET LANGUAGE
Quote:
Specifies the language environment for the session. The session language determines the datetime formats and system messages.


The Datetime data is stored as binary...
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900