Home » Developer & Programmer » Forms » Time Operations
Time Operations [message #281188] Fri, 16 November 2007 00:57 Go to next message
srikanthgoud
Messages: 2
Registered: November 2007
Location: Hyderabad
Junior Member

Hi guys,
can anybody help me, how to do time related operations.
i am using front end Oracle Forms.
I have a field which captures total duration(hh:mm) format.
How i can add Or perform some functions on that field
Re: Time Operations [message #281189 is a reply to message #281188] Fri, 16 November 2007 01:07 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
You're not exactly clear. What does the datetime item have to do? Do you want to display the elapsed time (like a clock)?

MHE
Re: Time Operations [message #281191 is a reply to message #281189] Fri, 16 November 2007 01:22 Go to previous messageGo to next message
srikanthgoud
Messages: 2
Registered: November 2007
Location: Hyderabad
Junior Member

Hi
Thanks for ur immediate response

my requirement is, i have a columns in a table.
from_time date format,(ex: 9:00)
To_time date format,(ex: 21:00)
duration number format;

now i have to calculate duration.
i.e difference between from_time and To_time.

so my requirement is to calculate duration and
and in another form i have to calculate total duration.
i.e sum(duration).

i think this is a very simple question.
but i faced this issue first time. plz help me.
Re: Time Operations [message #281629 is a reply to message #281191] Sun, 18 November 2007 21:37 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Define 'from_time' and 'to_time' as date-time fields but use a format of 'hh24:mi' so that only the hours and minutes are displayed. You can either store the 'duration' or calculate it on the fly. Is 'duration' to be hours or minutes?

You get the difference by subtracting the 'from_time' from the 'to_time', which will give you the answer in days, and then multiply it out to hours or minutes.

To get the 'total duration' then use a 'calculated field'. Search this forum for 'calculation mode'.

David
Previous Topic: form probem ora-06502
Next Topic: REP-52005: The specified key BSTI does not exist in key map file.
Goto Forum:
  


Current Time: Sat Dec 03 13:46:06 CST 2016

Total time taken to generate the page: 0.04041 seconds