Home » Developer & Programmer » Forms » Date Time Probelm in Form (Forms 6i, Windows 200 Pro)
Date Time Probelm in Form [message #344542] Sat, 30 August 2008 06:49 Go to next message
khalidmehz
Messages: 37
Registered: May 2008
Location: PAKISTAN
Member
Hi Experts!

I am facing a problem I want to calculate leave. In my form user enter a date time in format 'DD-MM-YYYY HH24:MI' and i want to add hours in this date time. I have another field in my form for hours. if user enter hours more than eight i convert it in days and remaining add as hours. days addition has no problem but when i add hours it doesnt show effect in next field i.e. End Date. Please help me. its urgent...
Re: Date Time Probelm in Form [message #344563 is a reply to message #344542] Sat, 30 August 2008 10:36 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Add fractions of a day; 1/24 is one hour, 3/24 are three hours, etc.
SQL> select to_char(sysdate, 'dd.mm.yyyy hh24:mi') now,
  2         to_char(sysdate + 1/24, 'dd.mm.yyyy hh24:mi') then_1,
  3         to_char(sysdate + 3/24, 'dd.mm.yyyy hh24:mi') then_2
  4  from dual;

NOW              THEN_1           THEN_2
---------------- ---------------- ----------------
30.08.2008 17:36 30.08.2008 18:36 30.08.2008 20:36
Previous Topic: Need to check space in varchar2 columns
Next Topic: How to refresh a table when a data is inserted
Goto Forum:
  


Current Time: Mon Feb 03 13:05:06 CST 2025