Use the DateDiff function to determine how many specified time intervals exist between two dates. Second, enter the formula into that cell. Here, cell B5 indicates the start date, and cell C5 indicates the end date. 2. Leap years Our videos are quick, clean, and to the point, so you can learn Excel in less time, and easily review key topics when needed. To get around this, bump the date by one in the end. May 6th, 2025 is a Tuesday. For best results, avoid entering years before 1753. And, in the end, you will see the result by following the above steps. In Microsoft Excel, we can calculate the years, months, days, hours, etc. What if the first date comes after the second? Note that in versions prior to Excel 2016, this format might have a different sample date like 3/14/01 1:30 PM. You don't specify the 1 because NETWORKDAYS assumes the weekend is on Saturday and Sunday. Read More: How to Count Months in Excel(5 ways). In this example, the start date is in cell D2, and the end date is in E2. The above example would be like this in Excel 2007: =NETWORKDAYS(D53,E53). This article describes the formula syntax and usage of the YEARFRAC function in Microsoft Excel.. For example, 2 establishes Sundays and Mondays as weekend days. The first two are the start date and the end date, which are reused throughout the formula. Duration Between Two Dates - Calculates number of days. As a first step, we can add line breaks and then define variables for startandendlike this: Notice all instances of B5 and C5 in DATEDIF have been replaced by start and end. In this example, the start date is in cell D13, and the end date is in E13. Lets have a basic understanding of the DATEDIF function first. Duration Between Two Dates - Calculates number of days. Note that in versions prior to Excel 2016, this format might have a different sample date like 3/14/01 1:30 PM. Ken is the author of Excel Charts For Dummies and all previous editions of Excel Formulas & Functions For Dummies. ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/8996"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/281712"}},"collections":[],"articleAds":{"footerAd":"
","rightAd":" "},"articleType":{"articleType":"Articles","articleList":null,"content":null,"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Solve","lifeExpectancy":null,"lifeExpectancySetFrom":null,"dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":148916},"articleLoadedStatus":"success"},"listState":{"list":{},"objectTitle":"","status":"initial","pageType":null,"objectId":null,"page":1,"sortField":"time","sortOrder":1,"categoriesIds":[],"articleTypes":[],"filterData":{},"filterDataLoadedStatus":"initial","pageSize":10},"adsState":{"pageScripts":{"headers":{"timestamp":"2023-02-01T15:50:01+00:00"},"adsId":0,"data":{"scripts":[{"pages":["all"],"location":"header","script":"\r\n","enabled":false},{"pages":["all"],"location":"header","script":"\r\n