Change language in the database during a query

0

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.

    
asked by anonymous 18.07.2014 / 21:23

1 answer

2

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

    
18.07.2014 / 23:34