Why do we use YEARSDIFFFROMNOW function?
1 Like
The YEARSDIFFFROMNOW function is used to calculate the number of years between a given date and today’s date. For example, If today’s date is 27/06/2025, and you want to find out how many years have passed since 27/06/2020, this function will return 5, because there are 5 full years between 27/06/2020 and 27/06/2025.
Syntax- YEARSDIFFFROMNOW(date, dateFormat)
Example- YEARSDIFFFROMNOW(“2020-06-27”, “yyyy-MM-dd”)
1 Like