0
Is it possible to change the language of the database only during the execution of an insertion query? I am having problems with date conversion due to the formation of them, the Bank expects dd-mm-yyyy, but in the query is yyy-mm-dd.
0
Is it possible to change the language of the database only during the execution of an insertion query? I am having problems with date conversion due to the formation of them, the Bank expects dd-mm-yyyy, but in the query is yyy-mm-dd.
2
The easy way is applying CONVERT
and specifying the desired format as the third argument. In your case, code 105:
SELECT CONVERT(VARCHAR(10), GETDATE(), 105)
It will generate something like:
18-07-2014
Other formats: http://msdn.microsoft.com/en-us/library/ms187928.aspx
Browser other questions tagged sql sql-server query
You are not signed in. Login or sign up in order to post.
In fact, you need to convert before, in the language you are using to access the BD.
– Marcelo Aymone
Hello Marcelo, I have an Insert already ready, and this is very big and can not be created again.
– Vinícius
So you want the easy answer. Without modifying anything I really don’t know answer.
– Marcelo Aymone