Something like this:
Code:
Year(CDate("January 15, 2008")) - Year(CDate("September 9, 1985"))
almost gives you the answer. But it is only accurate after 9/9 any year. So if the date is after December 31, midnight (after New Year's), but before the birthday, you need to subtract 1.
Statements that are True or False = -1 if True, and 0 if False.
Adding a minus value subtracts the absolute value of it.
So if you [u]add</u> to the statementâs value (the purple part is pseudocode)
Code:
+ (TheDayOfTheYearOf(CDate(textbox1.Text)) < _
TheDayOfTheYearOf(CDate(textbox2.Text)) _
)