find number oh month between two dates

Hello to everyone,

I’m trying to find the number of month (also of different years) between two specific dates (examples. 01.01.2022 - 01.01.2023= 12 month)

then i would calculate the number of month between the current month and year and a specific date (examples. 20.06.2022 - 20-01.2023 = 7 month)

How can i get these results?

tks

Try this (untested):

(
  (
    (
      (
        YEAR([Later Date])
        - YEAR([Earlier Date])
      )
      * 12
    )
    + MONTH([Later Date])
  )
  - MONTH([Earlier Date])
)

tks @Steve , you are ever so precious!

1 Like

i used this expression in order to find the number of month between the current month and year and a specific date (examples. 20.06.2022 - 20-01.2023 = 7 month)

(
(
(
(
YEAR([Fine_progetto])

  • YEAR(TODAY())
    )
  • 12
    )
  • MONTH([Fine_progetto])
    )
  • MONTH(TODAY())
    )
1 Like