I've already asked the question at: StackOverFlow and got sent to this place here.
I'm importing dates from a German SQL Server table into a German Excel file via the built-in Excel connection tool.
However the date format is just like in the SQL Server: 2012-08-08 but I want to display: 08.08.2012. When I double-click inside a cell it will recognize the German date formatting but of course I would like to have that format for the entire column in the beginning without having to manually change it.
I also need to be able to use these dates for calculations.
I know there is a text box where you can enter a SQL "Definition" in the Excel Connection tool but it doesn't really work with "normal" SQL-statements.
Do I need to change something in SQL Server or how do I make this work?
insert into [dbo].[DateTest] Values ('2011-12-01', '01.12.2011')
. The output is always the first format. With DBCC USEROPTIONS I can see the dateformat is set to dmy. What do I need to modify? A little example would be really nice. Thank you.