Home » Developer & Programmer » Forms » Time Calculation (Database 10g, Forms6i)
Time Calculation [message #405508] Thu, 28 May 2009 02:44 Go to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
Dear all

I have two different fields with DATE datatype and I am taking input in this foramt HH:MI mean they are storing time now I want to calculate difference between these two fields and show in other field.
Re: Time Calculation [message #405515 is a reply to message #405508] Thu, 28 May 2009 03:01 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Subtract them! The result will be number of days (so you might need to "convert" it to hours / minutes / whatever.

Note that DATE datatype contains both date and time, regardless the format you use in a form.
Re: Time Calculation [message #405516 is a reply to message #405515] Thu, 28 May 2009 03:20 Go to previous messageGo to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
so what DATA TYPE I should use?
Re: Time Calculation [message #405517 is a reply to message #405516] Thu, 28 May 2009 03:33 Go to previous messageGo to next message
ThomasG
Messages: 3212
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Depends on what the data is and how is it used. Can the "difference" span across midnight for example?
Re: Time Calculation [message #406460 is a reply to message #405515] Thu, 04 June 2009 02:34 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You might need to use a data type of 'datetime'.

David
Previous Topic: FRM-92100 error due to look and feel (merged 3)
Next Topic: Form to Database connection Problem
Goto Forum:
  


Current Time: Fri Sep 20 12:36:23 CDT 2024