commiting time [message #292123] |
Mon, 07 January 2008 22:43 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
syamthampiv
Messages: 16 Registered: November 2007
|
Junior Member |
|
|
hi friends
i am asked to show the time taken to commit a form after the save button is preseed in the form. Please help me how to do it ?
Looking forward for reply...thanks in advance..
|
|
|
|
Re: commiting time [message #292136 is a reply to message #292124] |
Tue, 08 January 2008 00:07 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
syamthampiv
Messages: 16 Registered: November 2007
|
Junior Member |
|
|
first of all thank u for ur kind reply.
i have created a form
with three fields. first two fields with datatype 'DateTime' with formatmask 'DD/MM/RRRR HH:MI:SS' and the third field with datatype 'Number' . there r three buttons also. when the first button presseed it will select the sysdate into the first textitem and when the second button pressed it also select the sysdate into the second text item. so when the third button pressed it will find the difference of the first two text items and assign it to the third text item.
let the first text item value be '08/01/2008 11:33:46'
and the second text item value be '08/01/2008 11:33:52'
and when the third button pressed the third textitem shows the defference as '.00006944444444444444444444444' wht this third value really shows.is it in milliseconds..plz explain wht this third value really represents..
|
|
|
Re: commiting time [message #292162 is a reply to message #292136] |
Tue, 08 January 2008 01:53 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
It is number of DAYS. From your example, it is obvious that the difference is 6 seconds. Here's how it is calculated:SQL> WITH test AS
2 (SELECT (TO_DATE('08.01.2008 11:33:52', 'dd.mm.yyyy hh24:mi:ss')
3 - TO_DATE('08.01.2008 11:33:46', 'dd.mm.yyyy hh24:mi:ss')) diff
4 FROM dual
5 )
6 SELECT diff, -- days
7 diff * 24 diff_hours, -- a day has 24 hours
8 diff * 24 * 60 diff_minutes, -- one hour has 60 minutes
9 diff * 24 * 60 * 60 diff_seconds -- one minute has 60 seconds
10 FROM test;
DIFF DIFF_HOURS DIFF_MINUTES DIFF_SECONDS
---------- ---------- ------------ ------------
.000069444 .001666667 .1 6
SQL>
|
|
|