JugglerJAF
Active Member
- Joined
- Feb 17, 2002
- Messages
- 297
- Office Version
- 365
- Platform
- Windows
Is there any way to use the VBA function DATEDIFF similar to the worksheet function DATEDIF to only count the number of days between two dates excluding the months. In the DATEDIF formula I'd use =DATEDIF(start_date,end_date,"MD") so 1st Apr 2020 to 15 May 2020 would return a value of 14 days, but I can't see an option within DATEDIFF in VBA to count days excluding months. If I use
then it returns the total number of days, not just the days after months have been "ignored".
VBA Code:
my_days = DateDiff("D", original_start, original_end)