AnsweredAssumed Answered

Get a date from a day

Question asked by ahamel on Dec 6, 2017
Latest reply on Dec 7, 2017 by ahamel

I sign folks up for classes that happen every two weeks. Class A, for example, is run every other Tuesday morning. Class B runs in that same week on Thursday afternoon. If I were to supply the date for say, Monday, for each of the class weeks, is it possible for FileMaker to figure out the date of a particular class. Let's use this example: December 4th is the Monday of a class week. I want FM to tell me the date of my Tuesday class (Class A) and also of my Class B (Thursday).

I think I am close. I have a table that has the classes, day of the week and times that they are held. I have a table that lists all the Monday dates that signify the start of a class week.

I have another table that is where the enrollments are made. In that table I would use the Classes::DayOfWeek and the WeekOf::Date to calculate the date of each class.

 

GetAsDate (Case ( Classes::Day = "Monday"; WeekOf::Date; Classes::Day = "Tuesday"; WeekOf::Date + 1; Classes::Day = "Wednesday";WeekOf::Date + 2; Classes::Day = "Thursday"; WeekOf::Date + 3; Classes::Day = "Friday"; WeekOf::Date + 4; ""))

It returns a number that I believe is the date in number format. Right now, though, it is returning the same number for Tuesday and Thursday.

Should I do this another way?

Outcomes