| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> checking the valid date string
How can I check the validity of the string for to_date()? I have a procedure which has 3 varchar2's as it parameters, c_yy, c_mm, and c_dd, then I try to call
to_date (c_mm || '.' || c_dd || '.' c_yy, 'mm.dd.yy')
when the inputs are valid, it works like charm, but how can I check the out of range month and day parameters? month is easy, but what about the day? I tried to do a reasonable EXCEPTION catch, but the following won't work either.
begin
select to_date (c_mm || '.' || c_dd || '.' c_yy, 'mm.dd.yy')
into d_date
from dual;
exception
when others then
-- do something here
can anyone help?
thanks in advance
Sent via Deja.com
http://www.deja.com/
Received on Thu Dec 21 2000 - 01:06:58 CST
![]() |
![]() |