This is not an homework question :).
I would like to code a function that return True if 6 months has passed since a given date (so, i'm on the first day of the seventh month).
Function PassedSixMonthsSince(Dim dGivenDate as Date, Dim dCurrentDate as Date) as Boolean
These are some tests that this function must pass:
Debug.Assert PassedSixMonthsSince("2000-01-01","2000-07-01")=True
Debug.Assert PassedSixMonthsSince("2000-01-31","2000-07-31")=True
Debug.Assert PassedSixMonthsSince("2000-08-31","2001-02-28")=False
Debug.Assert PassedSixMonthsSince("2007-08-31","2008-02-29")=False
Debug.Assert PassedSixMonthsSince("2000-05-31","2000-11-30")=False
i've tried to use DateAdd("m",6,dGivenDate) but it's not so easy.
thanks Michele