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 (October 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 3 Oct 2007 02:54:11 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: SAS date format problem
Comments: To: a320@hotmail.com
In-Reply-To:  <1191379709.831681.223230@50g2000hsm.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

Data _Null_ ; OldDate = 322 ; NewDate = Input( Put( OldDate , Z6. ) , YYMMDD6. ) ; Put NewDate= YYMMDD8. NewDate= YYMMDD10. NewDate= Date9. NewDate= MMDDYY10. ; Run ;

Toby Dunn

Compromise is like telling a lie, it gets easier and easier. Each compromise you make, that becomes your standard.

Perfection doesnt exist, once you reach it, its not perfect anymore. It means something else.

> Date: Tue, 2 Oct 2007 19:48:29 -0700 > From: a320@HOTMAIL.COM > Subject: SAS date format problem > To: SAS-L@LISTSERV.UGA.EDU > > Hello, > > I have a SAS dataset that has dates in the following format: YYMMDD. > For example, I would have a date that looks like this: 322. It means > 00-03-22 (Mar 22, 2000)- all the leading 0s are truncated. However, if > I format it using the YYMMDD8. format, I get something that looks like > 60-11-18, or 322 days since Jan 1, 1960. > How do I make SAS recognize a date like 322 as Mar,22 2000 or 20808 as > Aug 8th, 2002? > > Thanks in advance.

_________________________________________________________________ Help yourself to FREE treats served up daily at the Messenger Café. Stop by today. http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline


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