Peter Morris wrote:
Create new dates based on the month, day and use those. I would
recommend using a leap year, just in case the source was a leap year
too :-)
Or subtract out the year, i.e.
otherDate - new DateTime(otherDate.Year, 1, 1)
or DateAdd(otherDate, 'y', -otherDate.Year) -- not sure what the new
function is for this
This keeps all the time information and so forth without having to code for
each non-year field. Note however that if you want to check the day of the
week, you'd better use the original date with the year (subtraction creates
a TimeSpan, not a DateTime with the year erased).