B
Basharat Javaid
The following DateDiff function does not give the correct result in certain
cases. It counts the final month in which Day(EndDate) occurs even if the
Day(StartDate)>Day(EndDate).
E.g.. for StartDate= 08/19/51 & EndDate= 09/01/2016 it gives 781 months
which includes the month of 09/20/16!
Whereas the worksheet function DateDif ("m", StartDate,EndDate), gives the
correct answer.
Furthermore, Application.DateDif ("m", StartDate,EndDate) does not work in
the VBA module.
cases. It counts the final month in which Day(EndDate) occurs even if the
Day(StartDate)>Day(EndDate).
E.g.. for StartDate= 08/19/51 & EndDate= 09/01/2016 it gives 781 months
which includes the month of 09/20/16!
Whereas the worksheet function DateDif ("m", StartDate,EndDate), gives the
correct answer.
Furthermore, Application.DateDif ("m", StartDate,EndDate) does not work in
the VBA module.