Subtract 1 minute from a time

  • Hi everyone,


    I have a daily activity table with start and end times. The end time of each activity must end 1 minute before the next event starts. The document is content control and it cannot have overlapping times. Below is a example:



    [TABLE="width: 482"]

    [tr]


    [td]

    00:00

    [/td]


    [td]

    01:21

    [/td]


    [td]

    First event happened.

    [/td]


    [/tr]


    [tr]


    [td]

    01:22

    [/td]


    [td]

    02:27

    [/td]


    [td]

    Next event happened.

    [/td]


    [/tr]


    [/TABLE]


    I am trying to figure out how to write a macro to automatically fill in the end times which is always 1 minute from the start time of the next event.


    So far I figured out the table id, which is table 2. The .title tag which is "Start Time (hh:mm)" and the .title tag for the end time "End Time (hh:mm)"


    I am stuck and would greatly appreciate any help. I can do it the very crude way but there has to be a more efficient way. Attached is the code and the content control document.



    forum.ozgrid.com/index.php?attachment/72865/

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!