Home » Developer & Programmer » Forms » Calculation date in detail form 6i
Calculation date in detail form 6i [message #412911] Mon, 13 July 2009 06:45 Go to next message
asalam
Messages: 14
Registered: July 2009
Junior Member
hi
i have master form and detail form
in detail from i have to calculate expired date field
depending on date come from master form and then i have first date in detail form in the first row and every time we want to change this date to read from previous date + equitison and so on

for example
every 3 years , i read date from previous row and add 3 years
i want to write code on a button ,when button pressed calculate date and add 3 years
what can i do ?
thakx
Re: Calculation date in detail form 6i [message #412917 is a reply to message #412911] Mon, 13 July 2009 07:12 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
ADD_MONTHS(your_date, 3 * 12)
will add 3 years (actually 3 x 12 months) to your_date.

However, wouldn't you rather schedule a job to do that (instead of depending on user's memory whether he/she will remember to press that button or not)?
Re: Calculation date in detail form 6i [message #412920 is a reply to message #412917] Mon, 13 July 2009 07:16 Go to previous messageGo to next message
asalam
Messages: 14
Registered: July 2009
Junior Member
thank u so much
but would you please what can i do this schedule to remember or know which customer had an expired date?
if you can
thank u again
Re: Calculation date in detail form 6i [message #412922 is a reply to message #412920] Mon, 13 July 2009 07:25 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You'd write a stored procedure - it would do all the calculation (search for customers with expired date, add 3 years, whatever). Then you'd use DBMS_JOB (or DBMS_SCHEDULER) package to submit a job which would call this stored procedure regularly (for example, every day at 21:00).
Re: Calculation date in detail form 6i [message #413022 is a reply to message #412922] Tue, 14 July 2009 00:46 Go to previous message
asalam
Messages: 14
Registered: July 2009
Junior Member
thankx
Previous Topic: Providing username and password through forms for login to file server.
Next Topic: Only selected checkbox row should get saved in database
Goto Forum:
  


Current Time: Fri Sep 20 10:48:47 CDT 2024