You are here: Weekday names « MsSQL Server « IT news, forums, messages
Weekday names

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация