Re: how to test a string for a valid date in sql

From: Jaap W. van Dijk <j.w.vandijk_at_hetnet.nl>
Date: Fri, 11 Dec 2009 06:50:45 -0800 (PST)
Message-ID: <12b0f832-a9db-4ef1-a99a-cd3ca3b77921_at_j14g2000yqm.googlegroups.com>



On Dec 11, 11:30 am, yossarian <yossaria..._at_operamail.com> wrote:
> Jaap W. van Dijk wrote:
>
> > Is it possible to test with  format_regexp if ('31112009', 'ddmmyyyy')
> > is a valid date, or ('29022000', 'ddmmyyyy')?
>
> http://www.regular-expressions.info/dates.html

Thanks for the pointer. I will use a case statement similar to the perl alternative on this page. It is less complicated than I thought it would be.

Regards,
Jaap. Received on Fri Dec 11 2009 - 08:50:45 CST

Original text of this message