Posted by Jim Andersen on 01/04/07 08:47
Sql server 2000 -> sql query analyzer
select datename(dw,'01-01-2006')
returns sunday
Now I do:
set language danish
select datename(dw,'01-01-2006')
returns sonday. But it should be sndag. Same goes for
saturday/lordag/lrdag
Tried substring'ing and ascii'ing/unicode'ing and it is AFAIK an o instead
of the special danish character .
Is this a "feature" or am I doing something wrong?
I "solved" it by doing
select case DATENAME(dw,'01-01-2006') WHEN 'lordag' THEN 'lrdag' WHEN
'sondag' THEN 'sndag' ELSE DATENAME(dw,'01-01-2006') END
but it sure aint pretty.
/jim
[Back to original message]
|