Forum Discussion

Bernd Kroon's avatar
Bernd Kroon
Brass Contributor
May 27, 2020
Solved

How to calculate the duration between two date columns in a List?

Calculation and display of duration of a proces, calculated as difference of two column in SP list

I want to store the difference in days in column C between two columns A and B of a List in Sharepoint.  Both A and B are Date column. Column C is a calculated column. I work in NL, using Netherlands as locale. Field A and B correctly display date/Time in format of Netherlands. The formula in column C (which is A-B) yield a result, the delta in hours is correct, but it shows a date in the 18th century. How can I create the correct number of days?

  • Bernd Kroon You can use the following approach 

    This will be the way column will be defined:

    I hope this gives you some directions to think. Mark the response appropriately if it help you finding the solution.

     

    Thanks,

    Vik

  • Vikram_Samal's avatar
    Vikram_Samal
    Steel Contributor

    Bernd Kroon You can use the following approach 

    This will be the way column will be defined:

    I hope this gives you some directions to think. Mark the response appropriately if it help you finding the solution.

     

    Thanks,

    Vik

    • Heshan_Xray's avatar
      Heshan_Xray
      Copper Contributor

      Vikram_Samal 

       

      I did this using UK time/dates

      Start 22/1/2024 19:00 and end 22/1/2024 20:10

      The delta is shown as "30" using your formula. I would like to calculate hours and tried swapping the "D" to both "h" and "H" and it says "#VALUE!"

      I tried it as number and single line of text but still no avail

       

      Can you help

    • Moteen's avatar
      Moteen
      Copper Contributor

      Hi Sir,  I want to calculate the date, but the Delta is decreased on according to dates coming to target dates Vikram_Samal 

    • RAVADANEWERA's avatar
      RAVADANEWERA
      Copper Contributor
      I have a similar situation. I have a column that captures a person's started working date (let us say 1st June 2020). I want to create a column to automatically calculate the total experience real time. I added a column with today formula but I want to avoid this and use a formula instead to calculate the total experience with reference to started working date column. Also, would like to see if there is a possibility to get the result in decimals. Your formula was giving the response in intergers.

Resources