Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Paradox > Re: How to set ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 10 Topic 1298 of 1417
Post > Topic >>

Re: How to set up a table

by "Larry DiGiovanni" <nospam@[EMAIL PROTECTED] > Nov 9, 2007 at 03:09 PM

Craig wrote:

> The problem in hospitals is that the day starts @[EMAIL PROTECTED]
 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
 




 10 Posts in Topic:
How to set up a table
"Craig" <cra  2007-11-09 12:28:35 
Re: How to set up a table
"Steven Green"   2007-11-09 12:38:50 
Re: How to set up a table
"Craig" <cra  2007-11-09 14:10:07 
Re: How to set up a table
"Larry DiGiovanni&qu  2007-11-09 15:09:49 
Re: How to set up a table
"Craig" <cra  2007-11-09 15:49:05 
Re: How to set up a table
"Craig" <cra  2007-11-09 17:14:57 
Re: How to set up a table
"Larry DiGiovanni&qu  2007-11-12 10:42:23 
Re: How to set up a table
"Anders Jonsson"  2007-11-12 17:36:47 
Re: How to set up a table
"Anders Jonsson"  2007-11-12 20:53:11 
Re: How to set up a table
Dennis Santoro <RDAPre  2007-11-11 15:33:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 7 1:21:30 CDT 2008.