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.

Jobs

Academic Scheduler Need to identify differences in meeting Patterns

Academic Scheduler Need to identify differences in meeting Patterns

(OP)
I need assistance with with writing or script or creating formula fields that would help me to quickly identify schedule offenses by meeting patterns days and times.

The goal is to identify the following.

If day is MWF the course time should be 50mins
If day is TR the course time should be 75mins

RE: Academic Scheduler Need to identify differences in meeting Patterns

There is a Crystal Reports function that will return the week day number (i.e. will return 1 if the date is a Sunday). It is called DayOfWeek and it takes a date as a parameter. I do not know if this what you are looking for.

RE: Academic Scheduler Need to identify differences in meeting Patterns

(OP)
I was just reading up on that function, but I don't think it will give me what I need.

The field for days of the week are separate.
AS_CATALOG_SCHEDULE.MONDAY_IND1
AS_CATALOG_SCHEDULE.TUESDAY_IND1
AS_CATALOG_SCHEDULE.WEDNESDAY_IND1
AS_CATALOG_SCHEDULE.THURSDAY_IND1
AS_CATALOG_SCHEDULE.FRIDAY_IND1

I have created a field through the expert that allows me CONCATENATE the fields through multiple if statements. Would this function still work.

example
f (
NOT IsNull({AS_CATALOG_SCHEDULE.MONDAY_IND1}) and IsNull({AS_CATALOG_SCHEDULE.TUESDAY_IND1})and isnull ({AS_CATALOG_SCHEDULE.WEDNESDAY_IND1}) and isnull ({AS_CATALOG_SCHEDULE.THURSDAY_IND1}) and isnull ({AS_CATALOG_SCHEDULE.FRIDAY_IND1})
)
then
{AS_CATALOG_SCHEDULE.MONDAY_IND1}

I am attempting to write a statement that would look like the following
If {Days} = "MWF" then
IF {Time} <> "8:00 - 8:50" then
"Fail"
else
""
This would be done for multiple meeting patterns

RE: Academic Scheduler Need to identify differences in meeting Patterns

You could use one formula to tag failures:
datetimevar st := datetime(currentdate, time(split({schedtime},"-")[1]));
datetimevar end := datetime(currentdate, time(split({schedtime},"-")[2]));
numbervar dur := datediff("n",st,end);

if
(
(
not isnull({AS_CATALOG_SCHEDULE.MONDAY_IND1}) or
not isnull({AS_CATALOG_SCHEDULE.WEDNESDAY_IND1}) or
not isnull({AS_CATALOG_SCHEDULE.FRIDAY_IND1})
) and
dur<>50
) or
(
(
not isnull({AS_CATALOG_SCHEDULE.TUESDAY_IND1}) or
not isnull({AS_CATALOG_SCHEDULE.THURSDAY_IND1})
) and
dur<>75
) then
"Fail"

-LB

RE: Academic Scheduler Need to identify differences in meeting Patterns

(OP)
I have attempted to add this the full formula above, but I am receiving an error to many arguments for the function.

datetimevar st := datetime(currentdate, time(({AS_CATALOG_SCHEDULE.BEGIN_TIME1},"-")[1]));
datetimevar end := datetime(currentdate, time(({AS_CATALOG_SCHEDULE.END_TIME1},"-")[2]));
numbervar dur := datediff("n",st,end);

RE: Academic Scheduler Need to identify differences in meeting Patterns

You showed time as a single string field like this: "8:00-8:50" and the formula was based on that. Your field names now seem to show that there is a start time and an end time. Are they time data types? Or Strings? How do they each display?

-LB

RE: Academic Scheduler Need to identify differences in meeting Patterns

(OP)
I have two the field shown in example two is a datatype the field shown in example 1 is a concatenated field of the two datatypes listed of above.

RE: Academic Scheduler Need to identify differences in meeting Patterns

What kind of fields are they? Times? Or Strings?

If they are already time data types, then you can just change the variables like this:

Datetimevar st := datetime(currentdate,{AS_CATALOG_SCHEDULE.BEGIN_TIME_1});

Repeat for end variable. The final line would remain the same.

If they are strings, not times, then use:

Datetimevar st := datetime(currentdate, time({AS_CATALOG_SCHEDULE.BEGIN_TIME_1}));

-LB

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!

Resources

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