Groups | Blog | Home
all groups > sql server reporting services > november 2006 >

sql server reporting services : datepart("dw",Now())


QM06
11/7/2006 9:01:02 AM
Yes. Reporting services uses the .Net langauge instead of TSQL. You can use
the following:
now.DayOfWeek

[quoted text, click to view]
MS newsgroup
11/7/2006 9:12:31 AM
the function "datepart(dw, getdate())" works just fine on
Microsoft Sql Server Management Studio.
However, the function " datepart("dw", Now()) " doesn't work on report.

Is there someone who got the idea why it doesn't work?
Is there any other function which works same on report?


-Ken

MS newsgroup
11/7/2006 12:37:45 PM
could you tell me more specifically?
do I need to use then "datepart("dw", now.DayOfWeek
)"

Main goal is return integer depending on the dayofweek.

Thanks
if sunday =1, saturday=7


[quoted text, click to view]

QM06
11/7/2006 1:43:01 PM
Datepart is not needed. Just use Now.dayofweek. You'll get your integer and
that's that.

[quoted text, click to view]
MS newsgroup
11/8/2006 10:16:59 AM
It doesn't work if I use Now.dayofweek itself.



[quoted text, click to view]

QM06
11/13/2006 10:27:01 AM
If you're using this in the report body you could try this =now.dayofweek().

[quoted text, click to view]
AddThis Social Bookmark Button