This content has been marked as final. Show 4 replies
Netrunner wrote:This code returns an error message, not a Boolean.
I have a problem validating 2 dates, 1 startdate and 1 enddate. I know there are tons of threads about this already, but you must believe me that I tried all of them and not a single one worked for me. Even though the people said the code was working.
I tried the following code without success.
this code is entered at a "Validation > PLSQL > Returning function boolean"
begin if :P12_TODATE is not null and :P12_FROMDATE is not null then if TO_DATE(:P12_TODATE,'MM/DD/YYYY') <= TO_DATE(:P12_FROMDATE,'MM/DD/YYYY') then RETURN 'From date cannot be after the To date'; end if; else if :P12_TODATE is null and :P12_FROMDATE is null then null; else RETURN 'Both To and From values must be specified'; end if; end if; EXCEPTION WHEN OTHERS THEN RETURN 'Invalid Date'; end;