| 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? |
|
| In-Reply-To: | <201011081833.oA8HQOPM027934@willow.cc.uga.edu> |
| 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=;
5386 cards;
start_dt=19AUG10:06:00:00
5390 data dave;
5391 input start_dt :ANYDTDTM.;
5392 format start_dt datetime.;
5393 put start_dt=;
5394 cards;
start_dt=18AUG10:00:00:00
Notice the difference? Yours gave me the latter, on PC SAS 9.2 TSM2.
-Joe
On Mon, Nov 8, 2010 at 12:33 PM, Dave <david.brewer@uc.edu> 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.;
> cards;
> 2010-08-18 30:00:00
> ;
> run;
> proc print;
> run;
>
> 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.
>
> Thoughts?
> Dave
>
|