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
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:
input datetimevar mdyampm.;
format datetimevar DATETIME.;
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).
On Wed, Mar 28, 2012 at 2:32 PM, Ross Clark <firstname.lastname@example.org>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