LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (December 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 22 Dec 2009 11:35:09 -0600
Reply-To:   Craig Johnson <cjohns38@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Craig Johnson <cjohns38@GMAIL.COM>
Subject:   Date/time to date format in PROC SQL
Content-Type:   text/plain; charset=windows-1252

I’m pulling data from a database that is storing the date in a Date/Time format. I need to create a new dataset using a standard date format (MM/DD/YYYY). Is there a simple way to go from this 13JUL2006:00:00:00 to this 07/13/2006 in PROC SQL?

Example Code I'm working with....

PROC SQL; CREATE TABLE TEST AS SELECT A.ID AS ID1, A.DOB AS DOB1, B.ID AS ID2, scan('B.DOB', -3, ':') Format=mmddyy8. AS DOB2 FROM MDSVERI.Assessment1 AS A FULL JOIN ACCESS.Table1 AS B ON A.ID = B.ID; QUIT;

I'm sure there is a simple answer I'm just not sure what it is..... thoughts?


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