Forum Discussion

Ka_ChunL's avatar
Ka_ChunL
Copper Contributor
Oct 21, 2024

Convert the text to date and time format, calculate the processing tim

Hi Expertise,

I need your help. I have a problem about the sum of processing time from the data in text format as below. Can i get the answer of the sum of the following 2 jobs as 2 Days, 1 Hour, 15 Min and 30 Sec?

Thanks for your great help in advance. 

JobStart timeEnd timeHoursMinSec
119-12-2022 00:00:0019-12-2022 24:00:002400
219-12-2022 00:00:0020-12-2022 01:15:30251530
  • Ka_ChunL 

    In D2:

    =INT(24*(C2-B2))

    In E2:

    =INT(MOD(1440*(C2-B2), 60))

    In F2:

    =MOD(86400*(C2-B2), 60)

    Fill down.

    For the sum:

    Days:

    =INT(SUM(C2:C3-B2:B3))

    Hours:

    =MOD(INT(24*SUM(C2:C3-B2:B3)), 24)

    Minutes:

    =MOD(INT(1440*SUM(C2:C3-B2:B3)), 60)

    Seconds:

    =MOD(86400*SUM(C2:C3-B2:B3), 60)

    • Ka_ChunL's avatar
      Ka_ChunL
      Copper Contributor
      Hi HansVogelaar,
      Thanks for your great help : )

Resources