Search code examples
dategoogle-sheetsgoogle-sheets-formuladatediff

Number of days between past date and current date in Google spreadsheet


I want to calculate the number of days passed between past date and a current date. My past date is in the format dd/mm/yyyy format. I have used below mentioned formulas but giving the proper output.

=DAYS360(A2,TODAY())
=MINUS(D2,TODAY())

In the above formula A2 = 4/12/2012 (dd/mm/yyyy) and I am not sure whether TODAY returns in dd/mm/yyyy format or not. I have tried using 123 button on the tool bar, but no luck.


Solution

  • DAYS360 does not calculate what you want, i.e. the number of days passed between the two dates – see the end of this post for details.

    MINUS() should work fine, just not how you tried but the other way round:

    =MINUS(TODAY(),D2)
    

    You may also use simple subtraction (-):

    =TODAY()-D2
    

    I made an updated copy of @DrCord’s sample spreadsheet to illustrate this.

    Are you SURE you want DAYS360? That is a specialized function used in the financial sector to simplify calculations for bonds. It assumes a 360 day year, with 12 months of 30 days each. If you really want actual days, you'll lose 6 days each year. [source]