| Start Date | End Date | Months in 2021 |
2017-12-01 | 2021-08-31 | 8 |
| 2018-11-18 | 2021-11-17 | 11 |
| 2019-01-01 | 2023-12-31 | 12 |
I'm trying to generate the number of months for a particular year from a given range of dates.
Ex: I want the number of months in 2021 between the "Start Date" and "End Date" for each record to be shown in the third column "Months in 2021". What are the ways I can achieve this?