Forum Discussion

Bryantotalis's avatar
Bryantotalis
Copper Contributor
May 12, 2022

Day count funtion

Hi, 

Just wondering how i write a command that will calculate the number of days from a given date and time. Example - I have a cell containing 02/04/2022 14:13:47 . I wish to calculate the number of full days that has lapsed since that date and time.

Thanks,

Bryan

    • Bryantotalis's avatar
      Bryantotalis
      Copper Contributor
      I tried that with 02/05/2022 14:13:47 and it gave me an answer of 44693.
  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Bryantotalis Let's say that date/time is in A1, the following formula will calculate  the number of days (in decimals) lapsed till now. Round it to your liking and format the cell as General or Number as it will spit out a date/time value.

     

    =(NOW()-A1)

     

     

    • Bryantotalis's avatar
      Bryantotalis
      Copper Contributor
      I tried that with 02/05/2022 14:13:47 and it gave me an answer of 44693. My existing cell is set as general.

Resources