View Full Version : Age validation


theuman
04-29-2007, 01:57 AM
Hi

I have a field for date of birth, however I want to make sure that the person is older than 17.

This is what I have at the moment but it doesn't seem to work:
<=Date()-6720

So what's the best way to do it?

Can you help me?

RoyVidar
04-29-2007, 02:41 AM
hm - date()-6720 gives me 1988-12-04 - is that correct?

I think I'd try using dates in stead, for instance

<=DateSerial(Year(Date()) - 17, Month(Date()), Day(Date()))

theuman
04-29-2007, 04:39 AM
thanks very much

that works fine