3 Replies Latest reply on Sep 12, 2012 9:00 AM by Mark Holtz

# I want to add minutes to hh:mm field & calculate a new hh:mm result.  Here's an example:  add 90 minutes to 7:00.  Result = 8:30.  How do I do this?  Thanks.

I'm in healthcare & need to add procedure time to expected start time to get an estimated 'stop' time.  An example is:

Procedure is expected to start at 07:30.  Procedure is expected to run 90 minutes.  Expected end time is 08:30.  My data source has the expected start time & the expected procedure length.  I need to calculated the expected end time.  Help?  Thanks.

• ###### 1. Re: I want to add minutes to hh:mm field & calculate a new hh:mm result.  Here's an example:  add 90 minutes to 7:00.  Result = 8:30.  How do I do this?  Thanks.

Dates and times are stored as whole numbers and decimals respectively (i.e. 6 hours is 0.25 of a day) so to add your expected run time which is specified in minutes, first divide it by 1440 (number of minutes in a day) and then add it to your date dimension.

Hope that helps.

• ###### 2. Re: I want to add minutes to hh:mm field & calculate a new hh:mm result.  Here's an example:  add 90 minutes to 7:00.  Result = 8:30.  How do I do this?  Thanks.

What about DATEADD('minute',[Expected Procedure Length], [Start time])?

Andrew

• ###### 3. Re: I want to add minutes to hh:mm field & calculate a new hh:mm result.  Here's an example:  add 90 minutes to 7:00.  Result = 8:30.  How do I do this?  Thanks.

If your data is already a date data-type, Andrew's response of

DATEADD('minute',[Expected Procedure Length], [Start time])

will get you there.

You would need [Expected Procedure Length] to be a field in your data, or you could hard code it as: