Date: Mon, 8 Nov 2010 14:15:41 -0500
Reply-To: Randy Herbison <RandyHerbison@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Randy Herbison <RandyHerbison@WESTAT.COM>
Subject: Re: Time > 24:00 is OK in SAS?
Content-Type: text/plain; charset="us-ascii"
I don't see the format of your datetime value among those supported by the ANYDTDTM informat. Try the YMDDTTM informat and you'll see that it increments the date value:
130 data _null_;
131 dt=input('2010-08-18 30:00:00',YMDDTTM.);
132 put dt datetime.;
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Dave
Sent: Monday, November 08, 2010 1:34 PM
Subject: Time > 24:00 is OK in SAS?
Can anyone explain to me why SAS doesn't flag a time > 24:00 as any error?
input start_dt :ANYDTDTM.;
format start_dt datetime.;
SAS tells me that an invalid date (ex, Nov 31) will be flagged, but they
don't flag times > 24:00 as an error. How can you have more than 24 hours
in a day?
Because of this, I can't use the ANYDTDTM. as an INFORMAT. I must now
interrogate the field and look at the time portion.