Date: Fri, 20 Aug 2010 06:47:10 -0700
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: How to change the YEAR value of a numeric date variable?
Content-Type: text/plain; charset=ISO-8859-1
One way would be:
data olddate;
format date ddmmyy10.;
input date ddmmyy10.;
date=mdy(month(date),day(date),year(date)+1);
cards;
12/06/1995
;
HTH,
Art
----------
On Aug 20, 9:41 am, SAS programmer <learnsasonl...@gmail.com> wrote:
> data olddate;
> format date ddmmyy10.;
> input date ddmmyy10.;
> cards; 12/06/1995 ;
> run;
>
> I want to change the year value (which is 1995) to 1996 without
> converting the variable to character.
> Any help is appreciated.
|