2 posts
• Page **1** of **1**

Is there a way to subtract two time fields (for an elapsed time) and have the results be in an "Hours and Minutes" format? When I subtract Start Time from End Time (and divide by 3600) I get a proper number of hours, but the minutes portion of the answer is a fraction of an hour instead of a number of minutes. Instead of a result of "2.75" (indicating 2 and three-quarters of an hour) I would like it to be "2:45" (indicating two hours and forty-five minutes).

- wilbrian
**Posts:**5**Joined:**Tue Jun 16, 2009 8:32 am

wilbrian wrote:Is there a way to subtract two time fields (for an elapsed time) and have the results be in an "Hours and Minutes" format? When I subtract Start Time from End Time (and divide by 3600) I get a proper number of hours, but the minutes portion of the answer is a fraction of an hour instead of a number of minutes. Instead of a result of "2.75" (indicating 2 and three-quarters of an hour) I would like it to be "2:45" (indicating two hours and forty-five minutes).

Great question. You can show the output as a time, but you have to put the output back into seconds again. So for example, you would multiply the result by 3600 to get seconds, and then select the output display to time format. It will show the duration at that point!

- dhaupert
**Posts:**4111**Joined:**Tue May 26, 2009 11:51 am

2 posts
• Page **1** of **1**

Return to HanDBase General Discussion

Users browsing this forum: Google Feedfetcher and 1 guest