Results 1 to 2 of 2

Thread: Still having problems can someone help me

  1. #1
    Guest
    I'm still having problems with this section of code

    This is what I want

    I have a start time & End Time field. I'm able to calculate the total time. Example project started at 1:00PM and end at 8:00PM is 7 hours.

    This is what I need though. Everything after 5:00PM I need to times is by 1.5

    So I would have a calculation that does this

    1:00PM to 5:00PM is 4 hours
    5:00PM to 8:00PM is 4.5

    everything from 5:00 to 8:00 is multiplied by 1.5

    Thanks

  2. #2
    Lively Member
    Join Date
    Apr 2000
    Location
    Rafaela (Argentine)
    Posts
    107

    Smile

    Try this:
    Code:
    Dim a As Date, b As Date, c As Date, timeLimit As Date
    a = "01:00pm"
    b = "04:30pm"
    timeLimit = "05:00pm"
    c = b - a + IIf(b > timeLimit, (b - timeLimit) / 2, 0)
    Hope it works!

Posting Permissions

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



Click Here to Expand Forum to Full Width