none
Display the last day date of current week in the report RRS feed

  • Question

  • I'm building a report in Visual Studio 2005, I need to display the date of the last day of current week. For example, if today is Wednesday 10/24/2007 then display the last date of the current week that is 10/28/2007. I have tried various expressions using built-in methods of the report but unable to come up with a correct one.

    Please help.

    Thanks.  

    Wednesday, October 24, 2007 2:33 PM

Answers

  •  

    =Today().AddDays(6-Cint(Today().DayOfWeek().ToString("d")))

    Remember Sunday is the first day of the week, in your case last date should be 27.

     

    Long

    Thursday, October 25, 2007 9:02 PM

All replies

  •  

    =Today().AddDays(6-Cint(Today().DayOfWeek().ToString("d")))

    Remember Sunday is the first day of the week, in your case last date should be 27.

     

    Long

    Thursday, October 25, 2007 9:02 PM
  • Thanks a lot Long. Thats exactly what I was looking for. Do you happen to know any good online resource to learn more about expressions used in MS Report.

    Friday, October 26, 2007 12:57 PM