Assigning for an accendent sequence

V

viddom

Hi,
I have two columns, CURRENTDATE and CONTACTDATE and a third column called
DIFFERENCE that give me the number of days between the two, as follows
[CURRENTDATE]-[ CONTACTDATE]. In the column DIFFERENCE I want to assign a
number according to the quantity of years, as follows: 0 when<365, 1
when=>365 and <2(365), 2 when=>2(365) and <3(365), and so on.
I know how to switch a value according to a limit set of data, but when it
is about a sequence I am lost. Can you tell me what code can make such an
assignment. Thanks
 
R

Rick Brandt

viddom said:
Hi,
I have two columns, CURRENTDATE and CONTACTDATE and a third column
called DIFFERENCE that give me the number of days between the two, as
follows [CURRENTDATE]-[ CONTACTDATE]. In the column DIFFERENCE I want
to assign a number according to the quantity of years, as follows: 0
when<365, 1 when=>365 and <2(365), 2 when=>2(365) and <3(365), and so
on.
I know how to switch a value according to a limit set of data, but
when it is about a sequence I am lost. Can you tell me what code can
make such an assignment. Thanks

Does this give you what you want?

Fix(([CURRENTDATE]-[ CONTACTDATE])/365)
 
Top