calculating time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jawbone
    New Member
    • Nov 2011
    • 14

    calculating time

    help me with this. TotalTime:DateD iff("n",[starttime],[endtime])im getting mins instead of hours & mins. example" instead of 1.5 hr im getting 90. i know its something very easy to fix, but cant find it in Acess for Dummies.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    I don't know why you would expect to get hours when you're asking the function to give you minutes. Divide the result by 60 and that will give you fractional hours.

    Comment

    • jawbone
      New Member
      • Nov 2011
      • 14

      #3
      ok how do i ask the function to give me hours, thats the only formula i know to get start time and end time to work.

      Comment

      • sierra7
        Recognized Expert Contributor
        • Sep 2007
        • 446

        #4
        Try
        TotalTime:DateD iff("h",[starttime],[endtime])

        Comment

        • jawbone
          New Member
          • Nov 2011
          • 14

          #5
          i tried that sierra it just gave me a 0 for an answer

          Comment

          • jawbone
            New Member
            • Nov 2011
            • 14

            #6
            examle my time start is 11:00 and end time is 15.:15 im getting the answer 6 even thought we know that it should be 6hr15ms

            Comment

            • Rabbit
              Recognized Expert MVP
              • Jan 2007
              • 12517

              #7
              DateDiff returns an integer so you can't use it for fractionals. You have to go to a lower unit and then divide. Look at my post again. I told you how to get fractionals.

              Comment

              Working...