LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 1999, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 30 Nov 1999 14:24:05 -0500
Reply-To:     S David Riba <dave@JADETEK.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         S David Riba <dave@JADETEK.COM>
Subject:      Re: adding 12 months to the earlier date
Comments: To: kkana@MY-DEJA.COM
Content-Type: text/plain; charset="iso-8859-1"

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.


---------------------------------------------------------------------------- S. David Riba INTERNET: dave@JADETEK.COM JADE Tech, Inc. 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: 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 > Before you buy.

Back to: Top of message | Previous page | Main SAS-L page