Date: Wed, 6 Jul 2011 11:58:32 -0400
Reply-To: "Kirby, Ted" <ted.kirby@LEWIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Kirby, Ted" <ted.kirby@LEWIN.COM>
Subject: Re: data informat : "042011"
In-Reply-To: A<01384B2401936142AF5F65E3D12402780A8A173D@EX3VS1.nyced.org>
Content-Type: text/plain; charset="US-ASCII"
You will then need to format the date to what you want. For example:
data test;
input date $6.;
newdate=input(date,mmddyy6.);
format newdate monyy7.;
datalines;
042011
122008
012012
;
run;
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Bolotin Yevgeniy
Sent: Wednesday, July 06, 2011 11:28 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: data informat : "042011"
If you don't care about the date, why not just
input('042011',mmddyy6.);?
As long as you don't go too far past the third millennium it should work
fine (you'll be getting 19th or 20th of the month)
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Nat
Wooding
Sent: Wednesday, July 06, 2011 11:20 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: data informat : "042011"
Haikuo
I do not see any informat that will do this so I suggest the following
untested code
Date = compress( substr( date , 1 , 2 ) || '01' || substr( date , 3 );
Followed by an input statement with a mmyydd informat.
Nat Wooding
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Bian, Haikuo
Sent: Wednesday, July 06, 2011 11:09 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: data informat : "042011"
Dear list,
Is there an informat to convert character string such as "042011" to
date "apr2011" or any other date format? The added date info such as
first date of the month is fine.
Thank you for your time,
Haikuo
-----------------------------------------
Email messages cannot be guaranteed to be secure or error-free as
transmitted information can be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The Centers for Medicare
& Medicaid Services therefore does not accept liability for any error or
omissions in the contents of this message, which arise as a result of
email transmission.
CONFIDENTIALITY NOTICE: This communication, including any attachments,
may contain confidential information and is intended only for the
individual or entity to which it is addressed. Any review,
dissemination, or copying of this communication by anyone other than the
intended recipient is strictly prohibited. If you are not the intended
recipient, please contact the sender by reply email and delete and
destroy all copies of the original message.
************* IMPORTANT - PLEASE READ ********************
This e-mail, including attachments, may include confidential and/or proprietary information,
and may be used only by the person or entity to which it is addressed. If the reader of this
e-mail is not the intended recipient or his or her authorized agent, the reader is hereby
notified that any dissemination, distribution or copying of this e-mail is prohibited. If you
have received this e-mail in error, please notify the sender by replying to this message
and delete this e-mail immediately.