Home » Developer & Programmer » Forms » Calculation in timing wth Varchar2 Datatype (Forms [32 Bit] Version 10.1.2.0.2 (Production), Oracle Toolkit Version 10.1.2.0.2 (Production), PL/SQL Version 10.1.0.4.2 (Production), Win XP)
Calculation in timing wth Varchar2 Datatype [message #516304] Sat, 16 July 2011 07:56 Go to next message
umangsaini
Messages: 1
Registered: July 2011
Location: Delhi
Junior Member
Hi Sir,
I'm newbie in Oracle, atcually I'm facing a problem where I create a form and I want to feed time in "HH:MI" format, Firstly I choosed the "Date" datatype, but during the feeding of time i.e "00:30", means if I want to feed only mints, thn it doesn't accept, at the other hand if I feed "01:30" means mints wth hr thn it accepts.
To get rid of this problem I changed datatype "Date" to "Varchar2".

I create 3 columns on my form "TTL_WORKING_TIME" - "TTL_RUN_TIME" = "BRK_DWN_TIME". If I get any value in "BRK_DWN_TIME" column thn it has to be distribute in 3 or 4 reason of B/D, means if I get 00:30 mints brkdwn thn 00:15 mints for "reason1" and 00:15 mints for "reason2".

Now the problem is, how I make calculation where I use "Varchar2" datatype. please guide me.

Thanks in advance.
Re: Calculation in timing wth Varchar2 Datatype [message #516332 is a reply to message #516304] Sat, 16 July 2011 14:02 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
VARCHAR2 is certainly the wrong datatype. It *should* be DATE (in the database) and you should try DATETIME as form item's datatype. Apply the correct format mask.

Oracle computes date difference between DATE datatype values just fine.

It appears that your keyboard is somewhat broken (mints, thn, wth, brkdwn, ...). Could you, please, write full words?
Previous Topic: Is it possible to disable mouse navigation on data block or text item
Next Topic: F11(Query mode) and Execute Query in Oracle Forms
Goto Forum:
  


Current Time: Sun Sep 08 23:05:12 CDT 2024