Is it possible to change the language of the database only while executing an insert query? I am having problems with date conversion due to their formation, the Bank expects dd-mm-yyyy, but in the query is yyy-mm-dd.
Is it possible to change the language of the database only while executing an insert query? I am having problems with date conversion due to their formation, the Bank expects dd-mm-yyyy, but in the query is yyy-mm-dd.
The easy way is by applying CONVERT
and specifying the third argument as the desired format. In your case, code 105:
SELECT CONVERT(VARCHAR(10), GETDATE(), 105)
It will generate something like:
18-07-2014
Other formats: link