Day Of Week

Highlighted
Occasional Contributor

Day Of Week

Hello,

 

I want to count the number of weekends between two dates.

 

Do you have a solution for this demand ?

 

Thanks a lot

4 REPLIES 4
Highlighted
Master Anaplanner/Community Boss

Re: Day Of Week

Hi,

Try this:

ROUND(('Date 2' - 'Date 1') / 7)

 

anirudh_0-1602091930672.png

 

Regards,

Anirudh

 

 

Highlighted
Master Anaplanner/Community Boss

Re: Day Of Week

@TAGORTI ,

 

See if this works for you...

 

Create a SYS Time module by Day with the following line items:

Date: start()

Day Nbr of Week: WEEKDAY(Date)

Count Saturdays: IF Day Nbr of Week <> 6 THEN 0 ELSE 1

 

2020-10-07_13-48-55.png

 

In another module that is not dimensionalized by Time, you have 3 line items:

Date1: date formatted that is entered

Date2:date formatted that is entered

Number of Weekends:TIMESUM('SYS Time Filter - Day'.Count Saturdays, 'Date 2', 'Date 1')

 

2020-10-07_13-51-27.png

 

2020-10-07_13-51-37.png

 

Hope this works for you,

 

Rob

 

Highlighted
Occasional Contributor

Re: Day Of Week

@rob_marshall 

 

Thanks a lot.

 

It worked for me, I did some modifications. It fits my need.

 

Regards,

Highlighted
Occasional Contributor

Re: Day Of Week

Thanks for your response.
I was asking about weekends
Regards