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 (March 2012, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 28 Mar 2012 15:11:46 -0500
Reply-To:     Joe Matise <snoopy369@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Joe Matise <snoopy369@GMAIL.COM>
Subject:      Re: PL/SQL to SAS Date Conversion
Comments: To: Ross Clark <rosscharlesclark@gmail.com>
In-Reply-To:  <201203281932.q2SIrjHc011395@waikiki.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

As far as I can tell that format is fine for SAS. The following code reads it in fine:

data test; input datetimevar mdyampm.; format datetimevar DATETIME.; datalines; 03/21/2012 9:12:48PM 03/22/2012 9:15:48PM 03/23/2012 10:12:48AM ;;;; run;

Now, I don't know how you are reading in your CSVs - I'm not sure if PROC IMPORT would get it right, for example, as ANYDTDTM. does NOT get this one right - but at least for a manual read in this should work. ANYDTDTM. was close but got the AM/PM wrong (because it didn't go to 23 - ANYDTDTM23. does work, but may not be what PROC IMPORT would choose); perhaps putting it out in 'military' format would work better (24 hour clock).

-Joe

On Wed, Mar 28, 2012 at 2:32 PM, Ross Clark <rosscharlesclark@gmail.com>wrote:

> Greetings SAS-Lers! > > I would like to ask for help on an issue involving Dates in PL/SQL. > > Right now I extract data from a PeopleSoft database nightly and store it in > a Csv file which I later upload into SAS. > > The date column I import looks like this: > > "03/21/2012 9:12:48PM" > "03/22/2012 9:15:48PM" > "03/23/2012 10:12:48AM" > ... > > I would like to eventually obtain a SAS date-time value with which I could > use to rank-order the Cases within each subject. > > I have tried playing with PeopleSoft's default settings for outputting the > date in this form, to little avail. > > Please help. > Ross Clark >


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