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 (July 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 1 Jul 2005 20:18:49 +0000
Reply-To:     iw1junk@COMCAST.NET
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ian Whitlock <iw1junk@COMCAST.NET>
Subject:      Re: correcting incorrect dates using sas
Comments: cc: nevin.krishna@GMAIL.COM

Nevin,

Assuming a mistake for 10oct2010 (otherwise give details), in version 9

intnx ( "year" , date1 , -100 , "s" )

would do the job. If you must run in version 8, I presented a macro at SESUG 1999 that acts like a function and does the same job. If you want the macro contact me. However, I will be going on vacation starting tomorrow for a week, so you will have to contact me today or wait.

Warning: In both cases 29feb2000 is converted to 28feb1900 quietly.

Ian Whitlock ================= Date: Fri, 1 Jul 2005 10:39:20 -0700 Reply-To: nevin.krishna@GMAIL.COM Sender: "SAS(r) Discussion" From: nevin.krishna@GMAIL.COM Organization: http://groups.google.com Subject: correcting incorrect dates using sas Comments: To: sas-l Content-Type: text/plain; charset="iso-8859-1" hello all, i have a dataset in which a date field exists which is off by 100 years..the month and day are correct, but what should be 1914 for example is 2014..below please find an example... data junk; input date1 date9.; cards; 03MAR2014 02JUN2004 10OCT2010 ; RUN; the result i would like to see for date1 would be 03MAR1914 02MAR1904 01OCT2010 any suggestions for a simple solution to correct the dates? thanks, nevin


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