Thanks Larry,
I will have to think about this and try to put it into action.
Craig
"Larry DiGiovanni" <nospam@[EMAIL PROTECTED]
> wrote in message
news:4734bea1$1@[EMAIL PROTECTED]
> Craig wrote:
>
>> The problem in hospitals is that the day starts @[EMAIL PROTECTED]
>
> Time of day is just an expression of elapsed time past an arbitrary
start.
> Instead of actual time of day, store the time as an integer offset from
> the start of your workday in units to whatever granularity you need -
> minutes, seconds, etc.
>
> For minute granularity, you'd have 0700=0, 0715=15,
0730=30,...,0900=120,
> 0915=135,...,0600=1380, 0630=1395, 0659=1439
>
> The same way of thinking works without an offset. 0700=420,
> 0715=435,...,0600=1740, 0659=1759
>
>
> You have to translate this in and out during data entry, re****ting, etc.
> The simple way is to establish these values (using whichever scale you
> want) as the PK in a lookup, then associate with the actual time of day.
> Then rendering in a UI is a simple join or a backtrack.
>
> I've used this approach several times, mostly regarding a broadcast
> schedule, where the broadcast day starts and ends after midnight.
Before
> long it becomes automatic, and you start thinking in terms of offsets
> instead of TOD.
>
> --
> Larry DiGiovanni
>


|