none
How to set default date parameters to previous week (Sunday to Monday)

    Question

  • Hi,

    would it be possible to have two parameters begin date and end date to have thier default value be from last Monday to Last Sunday for example from Oct 24 to Oct 30th?

    Thanks again

    Tuesday, November 01, 2011 9:36 PM

Answers

  • First Day of previous week (Monday)

    =DateAdd(DateInterval.Day, -6,DateAdd(DateInterval.Day, 1-Weekday(today),Today))

     

    Last Day of previous week (Sunday)

    =DateAdd(DateInterval.Day, -0,DateAdd(DateInterval.Day, 1-Weekday(today),Today))

    Wednesday, November 02, 2011 1:23 AM

All replies

  • First Day of previous week (Monday)

    =DateAdd(DateInterval.Day, -6,DateAdd(DateInterval.Day, 1-Weekday(today),Today))

     

    Last Day of previous week (Sunday)

    =DateAdd(DateInterval.Day, -0,DateAdd(DateInterval.Day, 1-Weekday(today),Today))

    Wednesday, November 02, 2011 1:23 AM
  • Thank you so very much Shahfaisal. 
    Wednesday, November 02, 2011 2:06 PM