Computing the Number of Years and Months
If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.
- Installations and Emergencies!
- The Learning Curve
- Deep Dives on Specific Features
- The Community Treasure Chest
- Word Warriors®
- Resource Library
- News and Updates
There are a zillion needs to compute years and months: How many years and months are left in the (lease, loan, contract)? How long have you been a resident? How old is your dog?
While the Age function in our software does a terrific job on the "years" portion of the problem — even taking into account leap years, short months, exact date of birth — the "months" portion can be a bit more complex, starting with the definition of "month." While February and March are obviously two different months, when does the period between them count as a "month?" Is 2/28 to 3/1 a month? Under some circumstances, by some definitions, yes. If that is the case, the software's builtin "Month" function will do just fine; it counts each change in the name of the monthly period as a month. Feb-Mar is one month. Feb-June is four, etc. So to solve the whole number of years/ number of months problem is as simple as determining the start and end dates, possibly include the "Now" function as one or the other, then building a Field using the Math screens to pull up YEARS and MONTHS.
It's a bit more complex if "month" is defined as the period starting on a particular date of a month and ending on the same or some later date in some subsequent month. For example, 2/12 to 3/12 would be one month, but 2/13 to 3/12 would not.
The attached form shows the Derived Answers, definitions of date, Math functions, and Conditions necessary to compute all that while making it easy-peasy simple for the User. You can copy the Rows, Fields and Conditions necessary to match your needs and paste them into your form, using your own language for the Questions.
Remember to use the Show/Hide command to hide the Derived Answers.
Click to download an operating form that performs these calculations.
tags: year, month, term, length, time, calendar, lease, loan, date