Re: FORMS 3.X - SYSDATE calculation problem

From: Mike Rife <rife_at_moffitt.usf.edu>
Date: 1997/04/23
Message-ID: <5jkuld$rjj$1_at_news.usf.edu>#1/1


Try:

  if today = this_date then
   4 years ago = add_months(this_date,-4)

This approach will handle leap years for you.

In article <1997Apr22.120757_at_admin1.tcd.ie>, mcgrathm_at_admin1.tcd.ie says...
>
>
>
> Hi,
>
> I'm doing a date calculation in ver. 3.x forms that is to
> find the exact date 4 yrs ago e.g.
>
> if today = 22-Apr-1997 then
> 4 yrs ago = 22-Apr-1993.
>
> I've tried a few fixes including
>
> sysdate - (4 * 365) (leap yrs )
>
> to_char(sysdate,'yyyy') - 4.
>
> I would be interested in hearing from anyone else with a solution to
 this
> puzzle.
>
> TIA,
>
> Michael.
Received on Wed Apr 23 1997 - 00:00:00 CEST

Original text of this message