Blog

How To Excel Between Two Dates

How To Excel Between Two Dates
Blog

How To Excel Between Two Dates

Days Between Date

There are two formulas to find the number of days between two dates within excel. The first will only yield the number of days and that is the DAYS formula found in the Date & Time button within the FORMULAS tab in the ribbon. Using this simple method, you can find answers for the query on how to find date differences in excel, or else you can use another formula given below.

The 2nd Formula is DATEDIF

It may also be used to find the exact number of days but will also yield the number of months or years between two dates. One very important difference between the formulas is, The DAYS will list the end date first, whereas the DATEDIF range begins with the start date.

Shown below are the two formulas being used to find the exact number of days between August 15 and September 15.

How To Excel Between Two Dates 1

DAYS Formula

It’s written as =DAYS(End_Date, Start_Date) and becomes the quickest and easiest way to find the exact number of days or weeks (divide 7 into the results to get a week count). The dates can be formatted as Short Date (1/1/17) or Long Date (Sunday, January 1, 2017) the formula will work and the results will be the same.

How To Excel Between Two Dates To Change The Format 

The dates quickly go to the HOME tab in the ribbon, find the box and change the formatting with the drop-down menu as shown to the right.

How To Excel Between Two Dates 2

Tip: Make sure the cell that you enter the formula into is formatted to be either General or Number otherwise; it will list the date code for the numeric value. (eg. The above dates will result in 12/29/1900 as the answer until you change the formatting).

The DATEDIF Formula

It’s a slightly hidden formula within Excel and is written as

=DATEDIF(startdate, enddate,“interval”)

The Interval can be either days, months, or years. All accepted codes that may be input as intervals by Excel are as follows:

  •       d= days
  •       m= months
  •       y= years
  •       ym= number of months between two days while ignoring the year
  •       yd = number of days between two dates while ignoring the year

·        md = number of days between two dates while ignoring the year. This is not a recommended interval as it has many issues that result in negative numbers, a zero, or inaccurate results. inaccurate results.How To Excel Between Two Dates 3

Use All Working Integrals And The Same Date Range

Using all working integrals and the same date range gives the best example of how these integrals work within the formula. B2 shows there are 433 days between January 1, 2017, and March 30, 2018, but look at B6, while ignoring the year it results in 88 days between January 1st and March 30th. B3 shows the difference as 14 months and combining B4 & B5 shows the dates are 1 year and 2 months apart.

Finding the exact Years, Months and Days between the two dates is possible with use of the ampersand.

The 3rd Formula

DATEDIF is the 3rd formula to use “y” integral and “ym”. The third is the DATE formula that calculates the differences between two dates in excel and that is the end date and the first day of that month. To combine all three formulas: Enter an ampersand followed by the description in quotations, then another ampersand and the next formula.

Years, Months & Days Formula

You can see that adding “YEARS”, “MONTHS”, and “DAYS” into the formulas tell Excel exactly what the labels should be named within the results (B6). If you want to separate them with commas and spaces enter the commas and spaces into the quotation. For instance, “Years, ”.

Use DATEDIF And NOW As A Countdown

Combining the two formulas creates a continuous countdown towards a specific date. Let’s start a countdown to April 15th of Next year.

=DATEDIF(NOW(),4/15/18,”d”)

The result as of today (8/14/17) is 244 days until the close of tax season next year. Tomorrow the worksheet will say 243 because using NOW as the end date will continuously change the formula to the present day.

Uses Of The DATEDIF & DAYS Formulas

A few uses of the DATEDIF and DAYS formulas could be knowing how many months or days are left on a warranty, allocating depreciation, calculate the age of a company using its incorporation date, and of course as a countdown to holidays.

Factoring In Holidays

Another great function we can use is NETWORKDAYS, what it offers above other approaches is two-fold;

  1. Return number of ‘workdays’ in a period

So, for example, if we want to know the number of working days in a year we can do this:

=NETWORKDAYS(F56, F57)

Excel gives us the result ‘260’

  1. Return number of ‘workdays’ in a period FACTORING in holidays

This is very powerful, especially for budgeting, where we are trying to understand how to budget for contractors/consultants. We know the average person has 4 holidays a year (quite brutal!).

We can set up NETWORKDAYS and use the optional argument:

If we list the holidays separately, we can easily factor them in to the number:

Press  Enter and we get our updated result of 256, a more accurate value of number of days in the year that will be worked, That’s how to excel between two dates.

Full Excel Course Certification $7 $147Enroll Now
×

 

Hello!

We are available on WhatsApp. To Start a chat click below and we'll get back to you as soon as possible

× How can I help you?