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 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 2 Jan 2003 10:00:35 -0500
Reply-To:   "Wolf, Matt" <wolf.m@EI.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Wolf, Matt" <wolf.m@EI.COM>
Subject:   Date from text
Content-Type:   text/plain; charset="iso-8859-1"

Thanks to everyone who offered help with my "Create a data column" question. The problem I am now having is that I have a column of data that represents dates starting with "10101" for Jan 1, 2001 and running through "123101" for Dec 31, 2001. If this were Excel (and assuming the data is in column A) I would just write:

=IF(LEN(A1)=5,DATE(CONCATENATE(20,RIGHT(A1,2)),LEFT(A1,1),MID(A1,2,2)),DATE( CONCATENATE(20,RIGHT(A1,2)),LEFT(A1,2),MID(A1,3,2)))

I have no clue how to perform this is SAS.

Any help would be greatly appreciated.

- M


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