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 18:42:57 GMT
Reply-To:   Charles_S_Patridge@PRODIGY.NET
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Charles Patridge <Charles_S_Patridge@PRODIGY.NET>
Organization:   Deja.com
Subject:   Re: input function format for date like: 1/9/2001

John,

In case your date is really September 9, 2001 then use

data test; x = input("01/09/2001", mmddyy11.) ; /*** Jan 9, 2001 ***/ y = input("01/9/2001" , mmddyy11.) ; z = input("1/9/2001" , mmddyy11.) ; w = input("1/09/2001" , mmddyy11.) ; x1= input("01/09/2001", ddmmyy11.) ; /*** Sep 9, 2001 ***/ y1= input("01/9/2001" , ddmmyy11.) ; z1= input("1/9/2001" , ddmmyy11.) ; w1= input("1/09/2001" , ddmmyy11.) ; format x y z w x1 y1 z1 w1 date9.; run;

Charles Patridge In article <93fl1b$2ba$1@nnrp1.deja.com>, Charles_S_Patridge@prodigy.net wrote: > 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/ >

-- 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