Page 1 of 1

How to count the days without any event?

PostPosted: Wed Jul 06, 2016 9:50 am
by dunumba
Hi, I'm working with SC 6.24 and I need now to count the days without events in a year, or count the days with some event in a year.
How can I to do it? Thanks,
Damian

Re: How to count the days without any event?

PostPosted: Wed Jul 06, 2016 2:43 pm
by DanW
Hi Damian,

Thanks so much for reaching out to us. There are probably lots of ways to accomplish this, and though what I've attached probably isn't the most elegant, it should get the job done. Essentially, I'm performing a Find for every day of the year, and counting up if an event was found for that date. I include two requests in my find: the first to handle the case where the End Date is empty, the second to handle multi-day events.

In this example, I've hard-coded a start date as well as a number of days (365), but you'll likely want to account for the possibility of leap year. I hope this helps!

Re: How to count the days without any event?

PostPosted: Wed Jul 06, 2016 10:59 pm
by dunumba
Thanks, Dan. I need this calc for an statistical report; so a non-stored calc would be better. I'll try it. Thanks a lot, damian