Re: Datetime conversion in WHERE clause

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Philippe Lang" <philippe(dot)lang(at)attiksystem(dot)ch>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Datetime conversion in WHERE clause
Date: 2004-09-09 18:42:41
Message-ID: 200409091142.41872.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Philippe,

> Is there a way to force the date conversion to fail sliently, and simply
> return a null in case the parameter is not a valid date?

You'd need to write a custom function, using an external language that allows
you to test for valid date values. I prefer using PL/perlU with
Date::Manip, but use what you like.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2004-09-09 18:46:14 Re: Isnumeric function?
Previous Message Josh Berkus 2004-09-09 18:37:19 Re: aggregate function stddev