00:00If you're using dateDiv function, you have to be fully aware of its limitations associated with
00:04its use. Let me show you what I mean. Consider this table here. You got start date of January 1st
00:082022 and end date 14 May 2023. So the dateDiv function, you take the first argument as the
00:14start date, second argument as the end date, and the third argument is the unit of measures. So
00:17it's one year between the start and the end date. To calculate the month, this is how you do it as
00:22well. And you put the third argument as month and this is day. And the MD is to indicate the number
00:26of days between the two days, ignoring the month and the year. And the YM is calculating the number
00:32of months between the start and the end, ignoring the date and the year. And the YD is to calculate
00:37the number of days between the start and the end days, ignoring the years. But if you look at the
00:41different set of dates, 31st January 2022, 1st of May 2023, the date difference ignoring the year and
00:46the month is zero, which is obviously not correct. But if you look at this set of dates here, the date
00:50difference between these two dates are one, which is also not correct. So just be aware of it. Even
00:54Microsoft don't recommend you to use date div function along with the unit MD.
Comments