Forum Discussion

alan32563's avatar
alan32563
Copper Contributor
Sep 12, 2023

Calculate difference of days

I have two columns in a SP list. One is called 'Date Started' and the other one is called 'Date Ended'. I would like to calculate the difference in days. The problem I am facing is that the 'Date Ended' column has a timestamp whilst the other column does not. I only want to know the amount of days passed and dont need anything with the timestamp really.

 

 

  • navas16's avatar
    navas16
    Copper Contributor

    Hi alan32563 ,

     

    You can create calculated column and use the below formula.

    =DATEDIF(DateStarted,DateEnded,"D")

    Hope it helps.

     

    • alan32563's avatar
      alan32563
      Copper Contributor

      navas16 

       

      Hi thanks for this - I have tried this and it hasnt worked. It gives me an error in the syntax.

       

      Here is an example from my data (also I am from the UK so the date format is different)

       

      Date Started: 09/12/2023 12:45 

      Date Ended: 12/12/2023

       

      Total days taken : 3 

      • navas16's avatar
        navas16
        Copper Contributor

        alan32563 I believe this formula works even with different time format. If possible, can you please share a screenshot of formula and error?

Resources