5 Replies Latest reply on Oct 17, 2016 1:33 AM by AlexOrrow

# Calculating End time from Duration

Hi,

Novice question apologies!

I'd like to add a duration in hours and mins to a start time field with the result being an end time see examples. I understand that 1 hour equals 3600s but I cannot figure out a simple and clean way to make a calculation that will return the right time for a give duration in hours and mins?

Is this possible and can anyone please provide some pointers?

Thank you,

Alex

e.g.1

Start Time: 0900

Duration: 1hr 30mins

End Time: 10:30

e.g.2

Start Time: 0900

Duration: 30mins

End Time: 0930

• ###### 1. Re: Calculating End time from Duration

Hi,

does this help?

• ###### 2. Re: Calculating End time from Duration

If start and duration fields are both of type time, start + duration is all you need to calculate the end time. Just define end time as a calculation with a time result type.

• ###### 3. Re: Calculating End time from Duration

Yes... Thank you!

• ###### 4. Re: Calculating End time from Duration

Upon further thought, however, be careful of durations and start times that result in an end time past midnight. If such is possible, it would be better to use timestamps for the start time and as the result type of the calulation so that you get a time for the following day with a date to show that.

• ###### 5. Re: Calculating End time from Duration

Thanks for the replies and clarification. I have the calculation working as I had hoped.