G
G
Hello,
I have two text fields, DateOfBirth and TodaysDate
DateOfBirth:
16/01/1980
TodaysDate:
04/06/2007
I would like to validate using a CompareValidator if possible, that the user
is at LEAST 18 years of age. Does anyone know a quick way to do this
calculation in code behind (no need for a seperate class), which takes
things like previous leap years etc into account?
Quite new to .NET and C# - I am guessing there are some pretty powerful date
functions built in which could do this...
Gary.
I have two text fields, DateOfBirth and TodaysDate
DateOfBirth:
16/01/1980
TodaysDate:
04/06/2007
I would like to validate using a CompareValidator if possible, that the user
is at LEAST 18 years of age. Does anyone know a quick way to do this
calculation in code behind (no need for a seperate class), which takes
things like previous leap years etc into account?
Quite new to .NET and C# - I am guessing there are some pretty powerful date
functions built in which could do this...
Gary.