How to calculate time difference (minutes) between two military times?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bluemoon9
    New Member
    • Oct 2008
    • 56

    #1

    How to calculate time difference (minutes) between two military times?

    On my form, I have 3 fields: StartTime (milliary time 00:00), EndTime (milliary time 00:00) and Mintues (number). I would like to place a control calcuation statement in the Field Properties/Control Source and the field Minutes will populate automatically after user enter StartTime and EndTime. I know how to do this for Date, but not for time.

    thanks,

    bluemoon
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Essentially you use the DateDiff function. Make sure you use "n" and not "m" as m represents months and n minutes.

    Code:
    DateDiff("n",[StartTime],[EndTime])

    Comment

    • bluemoon9
      New Member
      • Oct 2008
      • 56

      #3
      thank you. It worked like a charm.

      bluemoon.

      Comment

      Working...