2

When the client select start date ,end date and group by : weekly is there any way to force to show in the week column as first day of the week. For example if I choose 10/1/2019 as start date and 10/2/2019 as end date and group by : weekly then the week column should show 9/29/2019 Right now the expression I am using is

= Switch(Parameters!GroupbyTime=“4”, CDate(Fields!groupweek.value).ToString(“Mm/Dd/yyyy”)

But it’s giving error can somebody help me ??

DatabaseCoder
  • 2,004
  • 2
  • 12
  • 22
Ronney
  • 25
  • 3
  • Please add error message in you question, and also tell us about the type of values hold by GroupByTime parameter and GroupByWeek field. – DatabaseCoder Oct 21 '19 at 05:09

1 Answers1

2

You can subtract the number of the weekday from the date plus one day for the first day of the week.

=DATEADD("D", 1 - WEEKDAY(Parameters!START.Value), Parameters!START.Value)
Hannover Fist
  • 10,393
  • 1
  • 18
  • 39