Re: FORMS 3.X - SYSDATE calculation problem

From: InfoAd - Jurrian Beuker <infoad_at_xs4all.nl>
Date: 1997/04/22
Message-ID: <5jit5a$65s$1_at_news1.xs4all.nl>#1/1


mcgrathm_at_admin1.tcd.ie wrote:

What do jou think about this ?

4 yrs ago =
to_date(substr(to_char(today,'DD-MM-YYYY'),1,6)||lltrim(to_char(to_number(to_char(today,'YYYY'))-3),'DD-MM-YYYY')

bye Jurrian, Holland

> 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.



InfoAd, Buro voor informatica.
Breezand 8, 3891 ZR Zeewolde
Tel (036) 5221108, Fax (036) 5221108
KvK Lelystad nr. 39047240 VRI nr 2096

Ps. Let niet op de taalfouten, ik ben woordblind. Received on Tue Apr 22 1997 - 00:00:00 CEST

Original text of this message