Forum Discussion

Kristy_Zim's avatar
Kristy_Zim
Copper Contributor
May 22, 2022
Solved

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

Hi,    I need to be able to subtract date in the following format <day> <hour>:<minute>:<second>   Customer placed order datetime Placed order with restaurant datetime 01 02:52:12 01 03:0...
  • flexyourdata's avatar
    May 22, 2022

    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")

     

     

     

     

Resources