Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating a Schedule Conflict
Message
De
05/08/2004 19:58:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
05/08/2004 19:04:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00931181
Message ID:
00931191
Vues:
17
To compare any two specific intervals, the following condition must be fulfilled to avoid a conflict:

StartTime2 >= EndTime1 or StartTime1 >= EndTime2

>Hi All,
>
>Trying not to reinvent a wheel here. I am creating an app for a child learning center. Each child can be entered into a several programs that the center offers. Each program has a schedule, i.e. PT1 meets M,W,F from 10:00 to 10:45, OT2 meets M to F 9:30 to 10:00. I need to figure out if there is a conflict between the programs that are scheduled for a child. I have a child table and a program table. The program table has logical values for each day of the week for when it meets and a from and to time that it meets. The number of programs a child is assigned to varies for each kid. A cross table contains a child id and program id. Any ideas of how to efficiently code whether there is a conflict in a childs schedule? I would need to know whether there is a confilct as well as which two or more programs conflict. Ideally it would be best to account for possibilites of any start and end time, i.e I don't want to make an assumption the start and end times are in 15 or 30 minute
>increments. Any ideas of to go about this?
>
>Thanks in advance.
>
>Peter
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform