Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313

    Unanswered: Problem multiplying hours

    Hello,

    I need to calculate a total number of hours based on a StartTime and EndTime, the difference is then multiplied by some integer between 0 and 5.

    The calculation is basically (EndTime-StartTime)*DayCounter

    The results need to be displayed in HH:MM

    My problem is if the difference is say 10 hours and I multiply that by 3, I get 1 day, 6 hours and I need to display 30 hours.

    I've made a feeble attempt at converting the hours to decimal, is that the only/best way to accomplish this?

    Thanks much for any ideas.

  2. #2
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313

    Re: Problem multiplying hours

    Figured out through some trial and error that
    (EndTime-StartTime)*DayCounter*24 will work.
    I'm tracking time in 15 min intervals, so decimal is good enough.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •