|Date: ||Mon, 8 Nov 2010 13:09:42 -0600|
|Reply-To: ||Joe Matise <snoopy369@GMAIL.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Joe Matise <snoopy369@GMAIL.COM>|
|Subject: ||Re: Time > 24:00 is OK in SAS?|
|Content-Type: ||text/plain; charset=ISO-8859-1|
I get an interesting difference here:
5382 data dave;
5383 input start_dt ANYDTDTM.;
5384 format start_dt datetime.;
5385 put start_dt=;
5390 data dave;
5391 input start_dt :ANYDTDTM.;
5392 format start_dt datetime.;
5393 put start_dt=;
Notice the difference? Yours gave me the latter, on PC SAS 9.2 TSM2.
On Mon, Nov 8, 2010 at 12:33 PM, Dave <firstname.lastname@example.org> wrote:
> Hi All,
> Can anyone explain to me why SAS doesn't flag a time > 24:00 as any error?
> data dave;
> input start_dt :ANYDTDTM.;
> format start_dt datetime.;
> 2010-08-18 30:00:00
> proc print;
> 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.