What is the SSRS expression for end day of week?

reporting-services, sql-server

Solution

SSRS Uses a dialect of Visual Basic, its Date functions are different from TSQL, you have to use

- "d" instead of DAY for day interval

- "w" instead of WEEKDAY for weekday

- Now() instead of GetDate() for current date.

Try

=DateAdd("d", 0 - DatePart("w", Now()), Now())

Problem

I have the following MSSQL query to return the ending day of the week in MSSQL: ``` SELECT DateAdd(Day, 0 - DatePart(Weekday, GetDate()), GetDate()); ``` I played around with the `=DateAdd` function, but it keeps throwing me an error for the Day parameter. Also, when I used `DateInterval.Day`... I get the same error. However, when I try placing that query into an SSRS expression, it throws me an error. Does anyone know the direct conversion for that query above in SSRS?

Original source