1

I need to use an SSRS expression to find two dates -

  1. The date that's the end of this week.
  2. The dates that's the start of the week, 2 weeks ago.

For example, if today is 27/05/2016

1 = 29/05/2016

2 = 09/05/2016

This needs to be dynamic e.g. getdate()

I'm using these functions to filter a matrix.

Thanks.

Pedram
  • 6,256
  • 10
  • 65
  • 87
MJCookie
  • 135
  • 1
  • 3
  • 10

2 Answers2

1

It may be something like below,

1. The date that's the end of this week.

=DateAdd("d", 7 - DatePart("w", CDate(Today)), CDate(Today).AddDays(1)).ToString("dd/MM/yyyy")

2. The dates that's the start of the week, 2 weeks ago.

=DateAdd("d", 2 - WeekDay(Today), DateAdd("d", -14, Today).ToString("dd/MM/yyyy")

SSRS Expression Cheat Sheet

Pedram
  • 6,256
  • 10
  • 65
  • 87
0

May be something like this,
End of this week

 =DateAdd("d", 8 - Weekday(Today), Today).ToString("dd/MM/yyyy")

Start of the week (2 weeks ago)

 =DateAdd("d", -(Weekday(Today)+12) , Today).ToString("dd/MM/yyyy")
Pedram
  • 6,256
  • 10
  • 65
  • 87
Naveen
  • 144
  • 5