SOLVED

Subtracting data in <day> <hour>:<minute>:<second>

Copper Contributor

Hi, 

 

I need to be able to subtract date in the following format <day> <hour>:<minute>:<second>

 

Customer placed order datetimePlaced order with restaurant datetime
01 02:52:1201 03:00:25
5 Replies

@Kristy_Zim 

Excel Formula: Calculate Days Hours Minutes seconds between Two Dates

=INT(C3-B3)&" days "&TEXT(C3-B3,"h"" hrs ""m"" mins ""s"" secs""")

or

Calculate the difference between two times

 

 

 

Hope I was able to help you with this information.

 

NikolinoDE

I know I don't know anything (Socrates)

best response confirmed by mtarler (Silver Contributor)
Solution

Dear @Kristy_Zim 

 

It is a little tricky to understand what you are after exactly.

 

However, if I assume that:

 

  • The month and year of the data is not relevant (it can be any month or year)
  • You wish to subtract "Customer placed order datetime" FROM "Placed order with restaurant datetime", so that you can achieve the goal:
  • "Determine how long after the customer placed the order the order was placed with the restaurant", while
  • Display the result in the same format as the input data (dd HH:mm:ss)

Then you can use something like this:

 

=TEXT(VALUE("2022-01-"&B2)-VALUE("2022-01-"&A2),"dd HH:mm:ss")

 

flexyourdata_1-1653234161745.png

 

 

 

@flexyourdata 

Yes, that's what I was looking for. Thank you very much for your help!!

Hi again,

I am trying to find the average of these travel time but excel isn't able to recognize it . Do I need to change the format ?
00 00:11:10
00 00:24:55
00 00:28:31
00 00:24:30
00 00:31:32
00 00:10:22
00 00:27:05
00 00:48:49
00 00:16:53
00 00:47:12

@Kristy_Zim 

If all times are within one date you may separate the column using Data->Text to Columns with space as delimiter. Or convert it to datetime by formula as previously discussed.

1 best response

Accepted Solutions
best response confirmed by mtarler (Silver Contributor)
Solution

Dear @Kristy_Zim 

 

It is a little tricky to understand what you are after exactly.

 

However, if I assume that:

 

  • The month and year of the data is not relevant (it can be any month or year)
  • You wish to subtract "Customer placed order datetime" FROM "Placed order with restaurant datetime", so that you can achieve the goal:
  • "Determine how long after the customer placed the order the order was placed with the restaurant", while
  • Display the result in the same format as the input data (dd HH:mm:ss)

Then you can use something like this:

 

=TEXT(VALUE("2022-01-"&B2)-VALUE("2022-01-"&A2),"dd HH:mm:ss")

 

flexyourdata_1-1653234161745.png

 

 

 

View solution in original post