×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Modeling single/multiple/indefinite dates for appointments

Modeling single/multiple/indefinite dates for appointments

Modeling single/multiple/indefinite dates for appointments

(OP)
How would I go about representing appointment dates that could either occur once, multiple times, or indefinitely?
For example, I'd like to know how an application like Microsoft Outlook stores its appointment/meeting date information.

Thanks!

RE: Modeling single/multiple/indefinite dates for appointments

It is does it dynamically. Only one appointment exists with a recurrence value.  You could do the same thing, and when you display your user interface you generate the recurring appointments first then load the non reoccurring.

RE: Modeling single/multiple/indefinite dates for appointments

(OP)
What exactly do you mean? How could the same type of thing be stored in a database?

RE: Modeling single/multiple/indefinite dates for appointments

Something like this

Appointment Table
Appointment ID    unique key
Appointment Time    timestamp
Appointment Recurrence Indicator
O = One Time, D = Daily, K = Weekdays Only, W = Weekly,
M = Monthly, L = Last Working Day of Month, etc
Appointment Description
etc

Recurrence Table
Recurrence Code    (as above O,D,K,W,M,L, etc)
Recurrence Time Window     (0 for O, 24 for D, etc.)
Recurrence Calculation
etc

Next Appointment = dateadd (timestamp + recurrence factor)

-------------------------
The trouble with doing something right the first time is that nobody appreciates how difficult it was - Steven Wright

RE: Modeling single/multiple/indefinite dates for appointments

(OP)
johnherman
Thanks for the reply! This is looking good. Could you please elaborate on these two fields:

Recurrence Time Window     (0 for O, 24 for D, etc.)
Recurrence Calculation


Thanks!

RE: Modeling single/multiple/indefinite dates for appointments

Recurrence Time Window is a codeindicating when the next recurring appointment will occur.

Calculation is not always used. For instacnce, if Weekly recurrence, then NEXT_APPT = DATEADD(LAST_APPT,7)  {using Oracle's DATEADD function.

If the recurrence is last Friday of day of month, there would be some sort of special calculation you would need to do. Example:
WHILE DayOfWeek <> '/Friday'
WHILE Month = CurMonth
etc
             

-------------------------
The trouble with doing something right the first time is that nobody appreciates how difficult it was - Steven Wright

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close