Adding the contents of two forms in Writer, display results in third form without using a database

I have three forms inside a writer document: StartDate, EndDate, and TotalMonths.

I want to substract the StartDate from the EndDate and output the total months between the dates.

StartDate and EndDate are formatted to mm/dd/yy format, while TotalMonths is formatted to be an Integer.

I want this functionality to convert as cleanly as possible to a PDF also.

Any assistance with this would be appreciated.