Home » Developer & Programmer » Forms » Time Storing (Oracle 10g, Forms6i)
Time Storing [message #406053] Mon, 01 June 2009 23:56 Go to next message
snsiddiqui
Messages: 168
Registered: December 2008
Senior Member
Dear All

I want to save machine starting and stoping time, after that system should calculate the difference between starting and stoping time and assign to third field as a total running hours.

Fields input and output formats should be HH24:MI.
Re: Time Storing [message #406059 is a reply to message #406053] Tue, 02 June 2009 00:13 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What is the question, actually? DATE datatype is to be used; apply desired format mask.
Re: Time Storing [message #406071 is a reply to message #406059] Tue, 02 June 2009 00:59 Go to previous messageGo to next message
snsiddiqui
Messages: 168
Registered: December 2008
Senior Member
Yes, I am using date datatype and my starting and stopping fields are saving data perfectly.

Actually my real scenario is,
We have different machines in floor; operator takes some time for machine setting, color matching then start production so I want to record all these time in system. These time inputs are FROM and TO basis like.

FROM TO
----- -----
SETTING TIME 07:00 07:30 text item (user input)
COLOR MATCHING 07:31 11:44 DISPLAY ITME
PRODUCTION TIME 11:45 16:30 text item (user input)

My requirement: When user input time in TO field of SETTING TIME then system should add one minute into TO field of SETTING TIME and assign to FROM field of COLOR MATCHING after that when user input time in FROM field of PRODUCTION TIME then system should less one minute and assign to TO field of COLOR MATCHING.

[Updated on: Tue, 02 June 2009 01:01]

Report message to a moderator

Re: Time Storing [message #406072 is a reply to message #406071] Tue, 02 June 2009 01:20 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is it about time arithmetic, then?
Quote:
system should add one minute ...

If so, "1 minute" can be calculated as "number of minutes in a day"; here's an example: I'll select current time and add one minute to it:
SQL> select
  2    sysdate,
  3    sysdate + 1 / (24 * 60) one_minute_later
  4  from dual;  |     |    |
                 |     |    number of minutes within an hour
                 |     |
                 |     number of hours in a day
                 |
                 number of minutes you want to add

SYSDATE             ONE_MINUTE_LATER
------------------- -------------------
02.06.2009 08:12:55 02.06.2009 08:13:55

SQL>

I guess that you should use it in WHEN-VALIDATE-ITEM trigger(s).
Re: Time Storing [message #406076 is a reply to message #406072] Tue, 02 June 2009 01:40 Go to previous message
snsiddiqui
Messages: 168
Registered: December 2008
Senior Member
Thanks LITTLEFOOT you filled my requirement.
Previous Topic: List Item Population
Next Topic: Login page problem
Goto Forum:
  


Current Time: Fri Dec 09 21:30:37 CST 2016

Total time taken to generate the page: 0.10602 seconds