Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6064 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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

Posted

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.

Posted

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.

Posted

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.

This topic is 6064 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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