Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

First and Last Day of the Week

$
0
0

I am trying to write a report and would like to set the dates like this.

if the report is ran on a monday or tuesday i would like the report to do the last saturday to the last friday.

for example if I ran it on

8.19.2013 then the date range should be 08.10.2013 to 08.16.2013 that would also be the same if i ran it on 8.20.2013. 

please help i have tried DateAdd and DatePart and can not seem to come up with the right combo.

the last expression i just tried was

DateAdd("d", -8, FirstDayOfWeek.System) and that gave an error message.


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>