How to count the days without any event?

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 44
Joined: Sat Mar 13, 2010 11:48 am
PostPosted: Wed Jul 06, 2016 9:50 am
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
SeedCode Staff
SeedCode Staff
Posts: 190
Joined: Tue Sep 22, 2015 2:27 pm
PostPosted: Wed Jul 06, 2016 2:43 pm
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!
Attachments
Screen Shot 2016-07-06 at 3.37.28 PM.png
Screen Shot 2016-07-06 at 3.37.28 PM.png (181.82 KiB) Viewed 5225 times
Posts: 44
Joined: Sat Mar 13, 2010 11:48 am
PostPosted: Wed Jul 06, 2016 10:59 pm
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

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
support@seedcode.com
Follow us: