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 (February 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 18 Feb 2005 15:32:21 -0500
Reply-To:     Nathaniel_Wooding@DOM.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nat Wooding <Nathaniel_Wooding@DOM.COM>
Subject:      Re: creating sas date from mixed format variable
Comments: To: nevin <nevinkrishna@HOTMAIL.COM>
Content-type: text/plain; charset=US-ASCII

Nevin

For the cases that you give mmddyy10. works for me.

Nat Wooding

data old; input olddate $16.; cards; 01/01/2003 2/5/2004 4/14/04 ; run;

data work.new; set old; newdate=input(olddate,mmddyy10.); format newdate mmddyy10.; proc print; run;

nevin <nevinkrishna@HOT To: SAS-L@LISTSERV.UGA.EDU MAIL.COM> cc: Sent by: "SAS(r) Subject: creating sas date from mixed format variable Discussion" <SAS-L@LISTSERV.U GA.EDU>

02/18/05 03:01 PM Please respond to nevin

hello,

i have been stumped on a date question and hope you have some insight.I have a dataset with a date field in which the dates are in differing styles (ie..some records have 2 digit years others 4, etc...). i am trying to create a new date field that is the sas date value for this problematic variable.below i made an example, but when i run the the second part of the program (data work.new step)the newdate field is missing..any ideas ? thanks,nevin

data old; input olddate $16.; cards; 01/01/2003 2/5/2004 4/14/04 ; run;

/*This section does not work*/

data work.new; set old; newdate=input(olddate,date9.); run;


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