Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

Excel DAYS function

To calculate the number of days between two given dates, the DAYS function in Excel can help you.

doc days function 1


 Syntax:

The syntax for the DAYS function in Excel is:

=DAYS (End_date, Start_date)

 Arguments:

  • End_date, Start_date: The two dates that calculate the number of days between.

 Return:

Return a number of days between two dates.


 Examples:

Example 1: To calculate the number of days between the start date and end date:

Please enter the below formula into a blank cell to get the number of days between two given dates:

=DAYS( B2, A2)

doc days function 1

Note: In the above formula, B2 is the end date, and A2 is the start date, please change them to your need.


Example 2: To calculate the number of days between today and another day:

Case 1: Calculate the days from today to deadline:

If you want to count the number of days from the current date till a specific date in future, please apply this formula:

=DAYS(A2, TODAY())

doc days function 2

Note: In this formula, A2 is the date of the deadline.

Case 2: Calculate the days from past date to today:

To calculate a number of days from today till a date in the past, please enter this formula:

=DAYS(TODAY(), A2)

doc days function 3

Note: In this formula, A2 is the past date that you want to calculate the number of days from.

Tips:

1. If the start date is greater than the end date, the calculated result will be a negative number as following screenshot shown:

doc days function 4

In this case, you can combine the ABS function with the DAYS function to get the positive number regardless of which order the dates are entered, please use this formula:

=ABS(DAYS(A2,B2))

doc days function 5

2. You can also replace the cell references in the above formulas with the date text string, such as:

=DAYS("2018/12/24","2018/1/12")

Excel Productivity Tools

300 Advanced Features Help You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 70% time.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.

Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Office Tab Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.