I was trying to do something similar but not quite. The solution above didn't work for what I was doing, and I couldn't find a solution anywhere but this is what finally worked:

=IFERROR(DATEDIF(D5,"01/01/2014","M"),-DATEDIF("01/01/2014",D5,"M"))

where D5 contains the date I'm comparing to 1/1/14

If D5 = 3/1/2014 the result is -2
If D5 = 3/1/2013 the result is 10

-Paul Falcon