Showing posts with label Exclude Public Holidays. Show all posts
Showing posts with label Exclude Public Holidays. Show all posts

Friday, July 27, 2018

Script to exclude Weekends and Public Holidays in SSRS

=IIF(DateValue(Fields!createdon.Value)=DateValue(Fields!modifiedon.Value),"0",
(DateDiff(DateInterval.day, DateValue(Fields!createdon.Value), DateValue(Fields!modifiedon.Value)))
- (DateDiff(DateInterval.WeekOfYear, DateValue(Fields!createdon.Value), DateValue(Fields!modifiedon.Value))*2)
- IIF(Weekday(DateValue(Fields!createdon.Value),1) = 1,1,0)
- IIF(Weekday(DateValue(Fields!createdon.Value),1) = 7,1,0)
- IIF(Weekday(DateValue(Fields!modifiedon.Value),1) = 1,1,0)
- IIF(Weekday(DateValue(Fields!modifiedon.Value),1) = 7,1,0)
-IIF(DateValue(Fields!createdon.Value)<=DateValue("January 01, 2017") and DateValue("January 01, 2017") <=DateValue(Fields!modifiedon.Value),1,0)
)