Time arithmetic in Oracle & WebDB

Time arithmetic in Oracle & WebDB

Post by dxmon.. » Sun, 31 Dec 1899 09:00:00


I've been scratching my head over something that I'm certain has been
solved several times before.  I have a table that has a column
of "times", that is, the real number of minutes that something happened
per day. For example, if I was a runner and tracking the number of
minutes I ran in a month, this table would look like:

Day  Minutes ran
---- -----------
1    45
2    98
3    37
4    102

and so on. Now, I need to generate a report which displays the time in
HH24:MI format. I thought, no problem, in the SQL statement for the
WEBDB report just use this:

select STATDATE "Day", TO_CHAR(TRUNC(RUNTIME/60),'09')||':'||TO_CHAR(MOD
(RUNTIME,60),'09') "Minutes ran"

which does work. However, I also need to generate column totals. I have
quite a few columns of this sort of info.

So, my questions are:
a) should I try to convert time? That is, I have successfully tried:
(60*24) ),'HH24:MI') "Minutes ran"
   But WebDB's total result for this column is 0. I *really* need
accurate times in the totals. Do I need to 'Add advanced PL/SQL code'?
What I'd really like to show is a total format that's a number of hours
that can be larger than 24 ":" MM. For example, someone might run
122:14 hours in a month.

b) should I abandon the convert to time approach and go back to
straight math, then write some crazy stored procedure to convert
everything back?

c) am I nutz for attempting such a thing in WebDB?

Many thanks

Sent via Deja.com http://www.deja.com/
Before you buy.


1. WebDB & Oracle 8.0.4

Hi All,

Anyone knows if WebDB 2.2 (or another version...) works under Oracle
8.0.4? I'm asking that because in the documentation only refer the
7.3.4, 8.0.5, 8.0.6 and 8i versions. Is this really true or is this a
manual bug?


William Murat

Sent via Deja.com http://www.deja.com/
Before you buy.

2. pgsql/src/backend/catalog (index.c)

3. Time arithmetic

4. Data dictonary and recursion

5. TIME Arithmetic

6. Query nested table attribute of column object?

7. Date/Time arithmetic help needed

8. HELP VFP5.0! Printout of all code included in the application.

9. Arithmetic on TIME datatype ?

10. Time arithmetic?

11. Magic Time Arithmetic?

12. Datetime comparison & arithmetic

13. Disconnecting users after idle time expires *in WEBDB* ?