Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 setting monday as date value

Author  Topic 

bhdijkstra
Starting Member

24 Posts

Posted - 2011-03-24 : 14:51:34
sql 2008:

i have DATENAME(DW; GETDATE())

however i want to use columnname dbo.Absences.StartDateActual

i can't get it right, can someone help me?

after this is done, i also want to change monday to the dutch word maandag, how to do this?

thanks!

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-03-24 : 14:57:45
Just run this before you call the function:

set language Nederlands
SELECT DATENAME(DW, Absences.StartDateActual)
FROM myTable
-- set language English -- Change it back afterward if you need to

edit: fixed query
Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2011-03-24 : 14:57:52
SELECT DATENAME(DW,a.StartDateActual)
FROM dbo.Absences a

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

bhdijkstra
Starting Member

24 Posts

Posted - 2011-03-24 : 15:12:44
both things are not working
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-03-24 : 15:19:15
show what you tried, and the error message
Go to Top of Page

bhdijkstra
Starting Member

24 Posts

Posted - 2011-03-24 : 15:22:37
http://img42.imageshack.us/i/bauke24032011202005.png/

the other one is totally not working.
Go to Top of Page

bhdijkstra
Starting Member

24 Posts

Posted - 2011-03-24 : 18:54:41
it has worked.
Go to Top of Page
   

- Advertisement -