This is going to sound wacky but I need to compare two dates while ignoring the year.
Dim n as Integer
n = DateDiff(DateInterval.Day, #7/1/2005#, #7/3/2006#)
n is “367” but what I really need to return is “2”
I’m trying to get the number of days before or the number of days after an anniversary date. If we were only talking about a single year it would be easy but sometimes these dates span over multiple years. Is there anyway to parse out the year and just compare the month and date? I could use a jumpstart on this one. Thanks!


Reply With Quote