Calendar View (A view with Calendar Style) ---Not working Please help

I have a view on Web which is a Calendar View that has a First column which is a DateRange = (StartDate - EndDate).

The view opens up a monthly calendar and also includes Weekends. Is there a way that weekends (Sat & Sun) are not included.

I looked at the forums and someone mentioned to use this type of code as below to exclude weekends on the calendar on web…but is not working…Could someone throw some light what is it that I am doing wrong.

Here is a code:

temp := @If(@IsAvailable(RepeatInstanceDates);

@TextToTime(@Text(RepeatInstanceDates));

@TextToTime(@Text(DateRange)));

@TextToTime(@Text(@Transform(temp; “x”; @If(@Weekday(x) = 1:7; @Nothing; x))))

Need help.

Thanks in advance,

ac ac