Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Is Date:

Re: Is Date:

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 05 Oct 2001 18:06:31 +0100
Message-ID: <3BBDE897.7676@yahoo.com>


Allan Martin wrote:
>
> Does anyone know of an IS_Date function or similar, where I could send it a
> string and if it was in a date format, it would return true or false if not?
>
> Allan

You'll need to use PL/SQL

create or replace function is_date(x varchar2) return varchar2 is  p date;
begin
  p := to_date(x);
  return 'OK';
exception when others then return 'NOT OK'; end;

You may want to try several format masks as well

hth
connor

-- 
==============================
Connor McDonald

http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue..."
Received on Fri Oct 05 2001 - 12:06:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US