Skip to main content
Participant
March 7, 2024
Question

Calculating difference between 2 dates in years and months in 2 separate fields?

  • March 7, 2024
  • 1 reply
  • 295 views

Hi,

 

I need to be able to calculate the difference between date of birth and date of death in years and months. My issue is that I need the amount of years to be in one field and the amount of months to be in a separate field.

 

For example, I have the following 2 fields:

BirthDate: 10/11/1994

DeathDate: 2/3/2024

 

Then somehow calculate this into the following 2 separate fields:

YearField: 29 years

MonthField: 3 months

 

Is this even possible? I really don't know the first thing about writing javascript from scratch. I've tried searching the forums here for a calculation but my company doesn't allow me to download files from here.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
March 7, 2024

It is possible, and was discussed here many times (although it's usually limited to years). Try searching the forum for "age calculation".