Re: How to store 'time' values?? Date field?
From: <stan_herrman_at_my-deja.com>
Date: Fri, 30 Jul 1999 16:00:53 GMT
Message-ID: <7nsi7d$kad$1_at_nnrp1.deja.com>
Date: Fri, 30 Jul 1999 16:00:53 GMT
Message-ID: <7nsi7d$kad$1_at_nnrp1.deja.com>
It sounds to me that you should use both the date and time within an Oracle date column. For example an employee begins work at 7/29/99 23:00 and leaves at 7/30/99 07:00. Certainly you would like the simple math of subtracting the two date/times and getting 1/3 of a day (8 hours).
To find out who is late getting into work (after 08:00), I'd use a SQL like:
select ?
from ?
where timetype_column = 'BEGIN_WORK'
and datetime_column - trunc(datetime_column) > (8/24)
Stan
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Fri Jul 30 1999 - 18:00:53 CEST