| Date: | Fri, 19 Jan 2007 14:45:46 -0600 |
| Reply-To: | Rob Rohrbough <Rob@ROHRBOUGH-SYSTEMS.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Rob Rohrbough <Rob@ROHRBOUGH-SYSTEMS.COM> |
| Subject: | Re: Safe way to test if a date is valid ? |
| Content-Type: | text/plain; charset="us-ascii" |
I haven't been following the thread closely, but has the original poster
tried:
x = input(y, ?? ANYDTDTEn.);
if rc = whatever... (with "?")
if x = . then whatever...
Check out the INPUT function with the "??" or "?" input control parameters.
Is this the thread that talked about SAS missing a year of the form "2BB6"?
If that fails, I would consider regular expressions in SAS9.
HTH,
Rob
Rob Rohrbough
Omaha, NE, USA
> -----Original Message-----
> From: Ya Huang [mailto:ya.huang@AMYLIN.COM]
> Sent: Friday, January 19, 2007 12:38 PM
> Subject: Re: Safe way to test if a date is valid ?
>
>
> >When I asked about an alternate INFORMAT I can trust to validate an
> incoming date string, none was
> >offered and I should consider using a character function
> (e.g., VERIFY) to
> ensure the year-portion
> >is intact and as expected. How unfortunate.
>
> Not even for v9?
>
|