Help with date conversion - how to handle invalid date
Date: Tue, 08 Dec 1998 21:45:18 GMT
Message-ID: <74k6ld$imf$1_at_nnrp1.dejanews.com>
[Quoted] I'm fairly new at PL/SQL and cannot figure out how to deal with a date conversion problem:
I am receiving a date in a 13 char field. I would like to place it into an [Quoted] Oracle date field. Is there anyway for me to check it's validity prior to [Quoted] placing it into the date field and causing an exception if it is not a valid [Quoted] date. If not, is it possible to me to handle the exception within the current [Quoted] block of code?
here is a sample of the problem:
IF tr_rec.inventory_end_date is not null THEN
err_msg:= 'INVENTORY END DATE '||blank_mand_msg;
INSERT INTO netout_msgs (net_input_data) VALUES (err_msg);
rec_err_count := rec_err_count + 1;
/* ELSE
var_check_date := TO_DATE(tr_rec.inventory_end_date, YYYYMMDDW); */
END IF;
I have searched your archives for a similar problem but could not locate one,
[Quoted] if I am repeating something that has been answered before, I apologize. Any
[Quoted] help or referral to help would be appreciated. Thank you.
Ellen V.
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Dec 08 1998 - 22:45:18 CET