# Calculate time difference with 4 date time columns

I have 4 dates In this format dd/mm/yyyy,hh:mm. Date1, Date2, Date3 and Date 4

The formula is: =(Date1+Date2)-(Date3+Date4) the results must be in hh:mm

At the moment I have 3 columns,

1. A =TEXT([Date1]+[Date2],"hh:mm")
2. B =TEXT([Date3]+[Date2],"hh:mm")
3. C =TEXT([A]-[B],"hh:mm")

I only need one column for this, I've tried putting it together and I get errors.

Thanks

Create calculated column with output type as Date and time. write below formula

``````= TEXT((D1+D2)-(D3+D4),"hh:mm")
``````
• I tried that and I get an error that say "Sorry, something went wrong. The formula contains a syntax error or is not supported" Nov 17, 2016 at 12:34
• it's a right answer I tried it that is working properly , just make sure that D1 is your field name ,so based on your mentioned field it should look like =TEXT((Date1+Date2)-(Date3+Date4),"hh:mm") Nov 17, 2016 at 16:09

Another way to get exact time difference between two dates you can use this formula:

=INT((A-B)*24)&":"&MINUTE(A-B)

EXAMPLE : I have 2 list column, A and B and both are DateTime field. Calculate column is single line of text field.

Values:

A= 11/18/2016 12:10 AM

B= 11/16/2016 12:25 AM

Result= 47:45 (47 hrs and 45 min difference)

• I tried them both again and they worked thank you very much Nov 29, 2016 at 6:24