Age [message #451740] |
Fri, 16 April 2010 08:56 |
sugarplum19
Messages: 3 Registered: April 2010 Location: uk
|
Junior Member |
|
|
How do I create a trigger for the age. I want an alert to appear when the date of birth field is less than the age of 17. The formula is age=sysdate-dateofbirth
|
|
|
|
|
|
|
Re: Age [message #451771 is a reply to message #451769] |
Fri, 16 April 2010 13:12 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Oh, yes - forgot to answer the question.
That would be the WHEN-VALIDATE-ITEM trigger. Pseudocode:if age < 17 then
message(you are too young)
raise error
else
null (or something else, but don't raise an error)
end if
[EDIT: changed "e" to "o"]
[Updated on: Fri, 16 April 2010 13:12] Report message to a moderator
|
|
|
Re: Age [message #451843 is a reply to message #451771] |
Sat, 17 April 2010 07:13 |
shaz
Messages: 182 Registered: June 2009
|
Senior Member |
|
|
Quote:Well, that depends on who you are asking. Depends on sex, that is.
If it is a lady (and we all know that it is impolite to ask her how old she is), the answer would approximately be "28" and she'll keep on saying that for another decade or so. However, the fact is that women do get older (while us, men, become charming)
What's it?
|
|
|
|
|
|
|
Re: Age [message #451938 is a reply to message #451931] |
Mon, 19 April 2010 01:22 |
|
Michel Cadot
Messages: 68686 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
'08-april-1990' is still NOT a date.
And what you want to calculate is the difference between the current date and the birth to get the age.
Once again read the link I provided.
Regards
Michel
|
|
|