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.

Featured Replies

I have a booking system where events are booked on a particular date at a particular time. The events are often late in the evening and end early am the next day. I need to ensure that an event is not booked for the same venue at a time that may conflict with an existing booking. The problem I am finding is the fact that 3:00 am is later than 10pm the night before. I need a way using a relationship to catch potential overlapping times. Could anyone help please, it's doing my head in and I'm sure there is a straightforward solution?

Use a timestamp instead of date and time (or calculate the timestamp from the entered date and time).

The relationship needs to be:

Events::VenueID = Events 2::VenueID

AND

Events::Start ≤ Events 2::End

AND

Events::End ≥ Events 2::Start

AND

Events::EventID ≠ Events 2::EventID

In thinking about the method for comparing times, consider (search for) the events which start one day and end a day later. Then continue your script to compare (in a loop) all events in that set to events which occur during that following day.

No, do what Comment says, in both using the time stamp AND using the multi-predicate relationship to do the heavy lifting.

A "time" by itself is practically* useless for anything. Hence "timestamp" was invented.

* Yes, yes, there are many practical uses for Time fields. This isn't one of them.

  • Author

Thanks very much. I agree with the relationship stance, and this is what was driving me a bit nuts. I thought about timestamp but wasn't sure how best to use it. I do not want to script this, so I think Comment's comments (he he) are valid here.

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.