Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calc to determine if Date range contains a Saturda

Featured Replies

This is a true left brain problem that I don't have the capacity to sort out. Here is the right brain description.

Our public access television center signs out equipment to members for several days at a time. Members get contracts that allow them to use equipment for up to so many full 24 hour days, we do not track by the hour. So if a member takes a camera from Tuesday to Thursday, then his contract is marked up with 2 camera uses. But since we are closed on Fridays, the members get a free day, so Friday to Sunday is counted as one day. So that is my problem.

I need a calculation that will give me the number of days between Date Out to Date In -but- subtract one day if that range contains a Saturday.

I tried lots of methods and I can't figure it out! I think I just don't have the experience to work it through, my skills are pretty basic in the scripting area.

The variables I have are CheckinDate, CheckoutDate, and the end result is a number CheckoutDays. I'm too embarassed to post any of the work I have done, but maybe someone out there with a lot of experience would be willing to show me the right method!

Thanks so much,

Sean

http://www.cctvcambridge.org

I think I would understand this better if you'd have said "We are closed on Saturdays".

Anyway, I believe (didn't test it too thoroughly) this calc will return the number of days between start and end, excluding any Saturdays in-between:

end - start - ( ( end - DayOfWeek (end) ) - ( start - DayOfWeek (start) ) ) / 7

  • Author

This is great! And it seems to be good for any date range, even beyond one week, as best as I can figure. Thanks for your time!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.