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 (January 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 9 Jan 2001 14:17:01 -0500
Reply-To:   Abelson_R <Abelson_R@BLS.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Abelson_R <Abelson_R@BLS.GOV>
Subject:   Re: input function format for date like: 1/9/2001
Content-Type:   text/plain

I believe that Ian has discovered a Y10K bug. <g>

> ---------- > From: Ian Whitlock[SMTP:WHITLOI1@WESTAT.com] > Sent: Tuesday, January 09, 2001 2:03 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: input function format for date like: 1/9/2001 > > Charles, > > I find it curious that the institute has provided informats for reading 5 > digit years, but no corresponding formats for their writing. > > 55 data _null_ ; > 56 dt = input ( '01/01/12345' , mmddyy11. ) ; > 57 put dt= mmddyy10.; > 58 dt = input ( '01jan12345' , date10. ) ; > 59 put dt= date9.; > 60 run ; > > dt=01/01/**** > dt=01JAN**** > NOTE: DATA statement used: > real time 0.00 seconds > > Well I suppose there is no need to panic yet, since one can report the > last > two digits. > > Ian Whitlock <whitloi1@westat.com> > > -----Original Message----- > From: Charles Patridge [mailto:Charles_S_Patridge@PRODIGY.NET] > Sent: Tuesday, January 09, 2001 1:25 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: input function format for date like: 1/9/2001 > > > John, > > The following code worked for me using SAS V6.12 on OPENVMS. > > data test; > x = input("01/09/2001", mmddyy11.) ; > y = input("01/9/2001" , mmddyy11.) ; > z = input("1/9/2001" , mmddyy11.) ; > w = input("1/09/2001" , mmddyy11.) ; > format x y z w date9.; > run; > > Assuming that 1/9/2001 stands for January 9, 2001 and not > September 1, 2001 > > HTH, > Charles Patridge > Email: Charles_S_Patridge@prodigy.net > > > In article <93fk27$1m9$1@nnrp1.deja.com>, > John Uebersax <jsuebersax@my-deja.com> wrote: > > I'd like to use the input function to supply dates with slashes, e.g., > > > > data _null_; > > x = input("1/9/2001", ddmmyy8) ; > > run; > > > > The problem with the code above is that it doesn't work for, say, > > 01/9/2001, 1/09/2001, or 01/09/2001. Is there a single format that > > works for all these cases? > > > > Thanks in advance. > > -- > > John Uebersax > > jsuebersax@yahoo.com > > > > Sent via Deja.com > > http://www.deja.com/ > > > > -- > Charles Patridge - PDPC, Ltd. > 172 Monce Road - Burlington, CT 06013 USA > Phone: 860-673-9278 or 860-675-9026 > Email: Charles_S_Patridge@prodigy.net - Web: www.sconsig.com > > > Sent via Deja.com > http://www.deja.com/ >


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