Invalid date - getting an error message on the form

Hi
I am using APEX version 3...
in my form I have a date field (with date picker option)... my users can pick the date with no issues... the issue is when my user enters manually (usually by mistake) something in the date field.... I get the following error message when the date is invalid
ORA-01840: input value not long enough for date format
I know in version 4 of APEX we can use dynamic action or validation function... is there an option to use in Version 3...?
thanks

Hi,
Create a Validation....
Name: Valid Date
Type: Function Returning Boolean
Validation Expression 1:
DECLARE
my_date DATE;
BEGIN
IF LENGTH (:P1_DATE) = 11
THEN
my_date := TO_DATE (:P1_DATE, 'DD-MON-YYYY');
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
EXCEPTION
WHEN OTHERS
THEN
RETURN FALSE;
END;
Error Message: Date is not a valid date!
Associated Item: P1_DATE
Condition Type: Value of Item in Expression 1 Is NOT NULL
Expression 1: P1_DATE
Regards,
Kartik Patel
http://patelkartik.blogspot.com/
http://apex.oracle.com/pls/apex/f?p=9904351712:1

Similar Messages

Maybe you are looking for

  • Need some help in EXECUTE IMMEDIATE Query

    Hi All, First of all i have a question. Is EXECUTE IMMEDIATE allowed for multi-row queries. (I am using Oracle 10g R2). Some of my colleagues are using pipeline operator. Please refer below BEGIN EXECUTE IMMEDIATE 'CREATE TABLE TEMP NOLOGGING AS'|| '

  • How to ensure iTunes download in blu-ray combo pack?

    When purchasing a blu-ray combo pack, how can you determine if the digital copy will be honored by the iTunes Store? Is there a certain logo to look for?  I am seeing less packs with the actual iTunes logo.  The words "works with iTunes" is meaningle

  • An information about follow up transaction document

    Hi all, How can i retrieve information about follow up transaction document. I need to know which table or anything else that can give me information about follow up document. For example if i have this business scenario : from contract --> follow up

  • Users not given option to "Use my Microsoft Windows user ID"

    Hi guys. Anyone seen this before? When our users connect to BPC, either through IE or straight from Excel, they get the following: The first time they connect in any session (after a reboot, logon, etc.) they are offered both options to sign in... "U

  • DEBMAS with only part of contact persons?

    Hi there, if we send in a DEBMAS IDoc that contains only a subset of contact persons of a customer, the inbound process will remove all other contact records from KNVK. We tried different MSGFN values, without success. Is there any way we could send