Question on DATEDIF with Leap Years consideration

rickyckc

Active Member
Joined
Apr 1, 2004
Messages
327
Hi,

Am I correct to say these....

If I do a datedif between say 01 Jan 1900 and 01 Jan 2010, I should deduct one day.

Like wise if I do a datedif between 01 Jan 1800 and 01 Jan 2010, I should deduct two days.

If I do a datedif between 01 Mar 1900 and 01 Jan 2010, the result is correct

?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Are you literally just looking for the number of days between the dates? If so you could just use EndDate - StartDate.
 
Upvote 0
Hi Jon,

Actually, I'm thinking whatever formula I use.

What I'm trying to ask is, Am I correct that I should deduct 29 Feb 1900, 29 Feb 1800, etc to get a accurate result.
 
Upvote 0
The year 1700, 1800, 1900 is NOT a Leap Year but I think Excel is recognising it as a existing date.
 
Upvote 0
I've never tried before 01 Jan 1900, so I didn't know. Guess now I do.

And thanks for that link. Now I also know ONLY 1900 is affected.
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top