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 (August 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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.


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