Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formula to subtract current date and issue years

Status
Not open for further replies.

kevnatajax

Technical User
Jun 25, 2002
14
US
select Year(CurrentDate)-{Clmincr.CIISSYEAR}
case <=1
&quot;Duration 1&quot;
case = 2:
&quot;Duration 2&quot;
case = 3:
&quot;Duration 3&quot;
case = 4:
&quot;Duration 4&quot;
case = 5:
&quot;Duration 5&quot;
case = 6:
&quot;Duration 6&quot;
case = 7:
&quot;Duration 7&quot;
case = 8:
&quot;Duration 8&quot;
case = 9:
&quot;Duration 9&quot;
case = 10:
&quot;Duration 10&quot;
case = 11:
&quot;Duration 11&quot;
case = 12:
&quot;Duration 12&quot;

I'm trying to add duration years for claims paid. The database has ciissyear as last numbers of date. I think I have to subtract current date with issue year. This formula gives me errors. Can anybody help me?

Thank you
Renata
 
Your syntax is incorrect.

select Year(CurrentDate)-{Clmincr.CIISSYEAR}
case 0 : &quot;Duration 1&quot;
case 1 : &quot;Duration 1&quot;
case 2 : &quot;Duration 2&quot;
...etc

If you need to quantify for negative years, use -N. However, if you need to account for more negative years than would be reasonable to code, use <=1 in combination with an If/Then/Else rather than a case.

Lastly, you don't need to post the same post multiple times.

Good luck,

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top