Home » Developer & Programmer » Forms » Age Validation
Age Validation [message #227286] Tue, 27 March 2007 20:56 Go to next message
sara666
Messages: 7
Registered: March 2007
Location: Wales
Junior Member
Hi

i was wondering if anyone could help me with sorting out an age validation check - i have a feeling i will need to use systime but i am unsure how to check - i want the date inputed to be 18 or more

can anyone help?

Thanks
Re: Age Validation [message #227289 is a reply to message #227286] Tue, 27 March 2007 21:20 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
This is a FAQ on this forum.
Are you incapable or unwilling to do some basic research of your own?

Post your SQL & explain what you've tried & why it is lacking.
Then you might get a more satisfying response.
Re: Age Validation [message #227291 is a reply to message #227286] Tue, 27 March 2007 21:24 Go to previous messageGo to next message
sara666
Messages: 7
Registered: March 2007
Location: Wales
Junior Member
Hi sorry this is the code that i have been working on but i have got know where with it.

IF :age > SYSDATE THEN
MESSAGE(’you must me 18!’);
RAISE form_trigger_failure;
END IF;
Re: Age Validation [message #227292 is a reply to message #227286] Tue, 27 March 2007 21:26 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
In what language is the "sample" written? I do not recognize it.
It appears you did not pay very close attention in class & have never read the manual which can be found at http://tahiti.oracle.com
Re: Age Validation [message #227372 is a reply to message #227292] Wed, 28 March 2007 02:06 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Anacedent, it is Oracle Forms PL/SQL. You won't find iDS manuals at tahiti Wink.

Basically, you want to count the number of months between sysdate and birth date.

IF MONTHS_BETWEEN(SYSDATE, yourbirthdate) < 216 -- 18 year * 12 months
THEN
-- do something
END IF;


Moved to Forms.

MHE

Previous Topic: Two Block Form Problem
Next Topic: forms60_path
Goto Forum:
  


Current Time: Sat Feb 08 21:33:29 CST 2025