Excel - DAYS function

The DAYS function returns the difference between two days.

=DAYS(C2, B2)



For example, the number of days between "7/8/2019" and "1/28/2020" is 204. Internally, Excel convert date value into integers and subtract these two integers. Excel store "7/28/2019" as 43654 and store "1/28/2020" as 43858. And 43858-43654=204, giving the same result as using the DAYS function.

Note: The DAYS function needs two arguments, the first one is the end date, the second one is the start date. It is counter-intuitive for many people and different from many other data software, so be very careful.

Comments

Popular posts from this blog

Excel - IF function

Excel - Hierarchical chart (Treemap)

Excel - VLOOKUP function