Defaulting a Parameter Date to Saturday of the week !

  • Hello guys,
    I need to default any date chosen from the date picker in SSRS to Saturday of current week. Logically it needs to check which day it is and add the remaining days so that the final date value is a Saturday. I tried the following but did not work :

    =iif(Weekday(Parameters!fdate.Value)<7,Parameters!fdate.Value=DateAdd("d", 7 - Weekday("wd",Parameters!fdate.Value) , Parameters!fdate.Value)

    Your help would be much appreciated.

    Thanks & Regards,
    Girish.

  • Hi Guys,

    In fact, the report should load with a default Saturday of the week. So i managed to get the correct syntax for the code:

    =iif(Weekday(Today())<7,DateAdd("d", 7 - (Weekday(Today())),Today()),Today())

    Hope this helps.

    Regards,
    Girish

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply