Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Seconds
You fail to state the version of Oracle.
At least in 9i and above, there is a "interval day to seconds"
datatype.
Which might be closer to what you want.
Unless you want to write a routine yourself to do this conversion.
ORA92> create table dhms (a number, b interval day(0) to second(0));
Table created.
ORA92> insert into dhms (a) values (10720);
1 row created.
ORA92> insert into dhms (a) values (31);
1 row created.
ORA92> update dhms set b = numtodsinterval(a, 'second');
2 rows updated.
ORA92> commit;
Commit complete.
ORA92> select * from dhms;
A B
10720 +0 02:58:40 31 +0 00:00:31
Anurag Received on Fri Mar 24 2006 - 09:47:01 CST