Re: Checking for a valid date
- From: "Kerry Moorman" <KerryMoorman@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 27 Jun 2005 09:46:05 -0700
Jason,
Doesn't IsDate use this same technique internally?
Kerry Moorman
"Jason Pettys" wrote:
> I recommend against this method in most cases; exceptions are
> resource-intensive and shouldn't really be used for raw user-data
> validation. It probably wouldn't matter much on a Win Forms app, but I
> would really back away from this on ASP.NET if you're expecting any
> volume of traffic.
>
> The IsDate would be a better way to go.
>
> Jason
>
> www.pettysconsulting.com
>
>
> Armin Zingler wrote:
> > "romy" <royalizi@xxxxxxxxxxxx> schrieb
> >
> >> What's the easiest way to verify the user had entered a valid date ?
> >>
> >>
> >
> > Call Date.Parse in a Try/Catch block. If there's no excecption the date
> > was valid.
> >
> >
> > Armin
>
.
- Follow-Ups:
- Re: Checking for a valid date
- From: Jason Pettys
- Re: Checking for a valid date
- References:
- Checking for a valid date
- From: romy
- Re: Checking for a valid date
- From: Armin Zingler
- Re: Checking for a valid date
- From: Jason Pettys
- Checking for a valid date
- Prev by Date: code generator received malformed input
- Next by Date: "Handles" Question
- Previous by thread: Re: Checking for a valid date
- Next by thread: Re: Checking for a valid date
- Index(es):