Is there a more efficient way of doing this below? I want to have the difference in years between two dates as a single scalar. Any suggestions are welcome.
If you mean efficient in terms of code space then no, that's about the most efficient way to do that.