There is not one answer to either of your questions, because those answers
depend on what you need to do with the information. Filemaker stores dates
as numbers-- the number of days since 1/1/0001, and time as the number of
seconds elapsed since midnight. Date/time values, then, can be expressed
numerically as seconds, by multiplying the days by the number of seconds in
a day (best to start from one constant, recent date, such as 1/1/1970 like
Unix, or 1/1/2000, to keep the values reasonably low), and then adding the
time component.
Typically, date/time events are broken into single components lasting as
long as the shortest event the project needs to track-- perhaps half-hour
blocks might work in your example. Then multiple child records-- one for
each unit-- are scripted to be created for each event, 6, say, for 6 p.m. to
9 p.m. Then multiline keys are calculated to test date/time ranges against
those blocks.
Much more complex and dynamic date/time range problems can be managed using
Smart Ranges:
http://www.onegasoft.com/tools/smartranges/index.shtml
....but the learning curve can be steep. It will allow you to test ranges on
both sides (is the tutor working any time between two date/time values),
without the need for a zillion child records.
--
John Weinshel
Datagrace
Vashon Island, WA
(206) 463-1634
Associate Member, Filemaker Solutions Alliance
"Cylurian" <fsromero (AT) hotmail (DOT) com> wrote
Quote:
First question is can a field hold a range of time? For example, I have
a tutor who works Monday 11 am - 2 pm and again 6 pm - 9 pm. Can I store
that in a field or should I use multiple fields.
Then how can I script FM so it will be able to identify that at 8:30 pm a
student can work with that tutor, for it falls in the tutor's hours.
thx |