Forum Discussion

amarnath subramani's avatar
amarnath subramani
Copper Contributor
Feb 19, 2018

To Add huge set of secs.milllisec to given time in hh:mm:ss.millisecs

Start time is 10:48:00.000 (10 - hr 48 - min 00 - secs 000 - milli secs).

Requirement to add huge set of secs.milli secs to the start time

Eg: 01.408 (01 - secs 408 - milli secs).

(Start time) 10:48:00.000 + 01.408 (secs.milli secs) = 10:48:01.408.

To Take care:

1. 60 secs is 1 min, so minutes needs to get incremented accordingly, Eg:(Start time) 10:48:00.000 + 61.523 (secs.milli secs) = 10:49:01.523

2. 60 minutes is 1 hr, so hours needs to get incremented accordingly, Eg:(Start time) 10:48:00.000 + 3600.478 (secs.milli secs) = 11:48:00.478.

Need help to derive the formula / steps to achieve in Microsoft excel.

3 Replies

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    Armanath,

     

    and if you want to type the numbers as seconds,milliseconds then:

     

     
      A B C
    5 10:48:00,000 1,408 10:48:01,408
    6 10:48:00,000 61,523 10:49:01,523
    7 10:48:00,000 3600,478 11:48:00,478

     

    Cell Formula
    C5 =A5+B5/24/60/60
    C6 =A6+B6/24/60/60
    C7 =A7+B7/24/60/60

     

    • amarnath subramani's avatar
      amarnath subramani
      Copper Contributor

      Thanks. Since, to add with secs.millisecs (set as number in Format cells), modified the formula as C1+D1/(24*60*60) which worked.

  • Hello,

     

    make sure the cells are formatted with custom number format h:mm:ss.000;@

     

    Next, if you enter a second.millisecond number into a cell, you also have to enter the hour and minute as 0. For example enter 01.408 as 0:00:01.408 and enter 61.523 as 0:00:61.523. The last number will be converted to show as 

    0:01:01.523

    and you can add it to the initial time value correctly.

     

     

Resources