|
If I understand your request correctly, the easiest answer is to use the
INTNX function.
The simplest solution would be:
nextdt = INTNX('month',fromdt,12) ;
However, this will default to the first of the month. You could also try
this:
nextdt = INTNX('day',fromdt,365) ;
The INTNX function takes three arguments --
1. Time interval (DAY, WEEK, MONTH, YEAR)
2. Variable
3. Number of intervals
Note that in each case, it defaults to the first of that interval (ie 1st
day of month, 1st day of week, etc).
There have been several more accurate (and more complicated) calculations
posted on SAS-L, but it does not appear that you need that level of
complexity for your request.
Dave
----------------------------------------------------------------------------
S. David Riba INTERNET: dave@JADETEK.COM
JADE Tech, Inc. http://www.jadetek.com
P O Box 4517
Clearwater, FL 33758 SAS Certified Professional - V6
VOICE: (727) 726-6099 A SAS Institute Quality Partner
SAS. It's not just an attitude
----- Original Message -----
From: <kkana@MY-DEJA.COM>
Newsgroups: bit.listserv.sas-l
To: <SAS-L@LISTSERV.UGA.EDU>
Sent: Tuesday, November 30, 1999 2:01 PM
Subject: adding 12 months to the earlier date
> Hi all,
>
> Can some one help me how to add 12 months for earlier date.
> THis should come like this,
>
> Policy from date(after added 12 months to from date)
> num. date
> (yymmdd)
> 132 840924 added 12 months for from date.
>
>
> Thanks
> KK
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
|