How to use time in Oracle
From: Richard Holowczak <holowczk_at_rwja.umdnj.edu>
Date: 15 Nov 92 17:40:34 GMT
Message-ID: <1684_at_rwja.umdnj.edu>
Date: 15 Nov 92 17:40:34 GMT
Message-ID: <1684_at_rwja.umdnj.edu>
How do people use time in Oracle databases? I am writing a manufacturing system which needs to know when things start and end and how long they will take to complete. I have tried using the TIME component of the DATE datatype but this very clumsy to work with. Other options might be to make several INTEGER fields and use them as HOURS and MINUTES. This also has shortcommings. Any advice out there?
The operations I'd like to be able to do are the following:
Data entry of the current time of day (10:45 pm) as well as the time to complete a task (1 hour and 10 minutes). Time math such as Current time is 11:00 and task will take 1 hour and 30 mins. to complete so task should be done at 12:30. Other time math might be: This task will take 30% longer to complete. How long is this in hours and minutes? (i.e. 30% of 1 hour and 10 mins. = ?) Time comparisons such as A process is "Due" to complete at 11:30. It really completed at 11:35. Is it late or early and if so by how much?
Thanks in advance
Rich Holowczak
Rutgers University
Industrial Engineering
Received on Sun Nov 15 1992 - 18:40:34 CET