2nd Post Time Difference

B

Bryan Hughes

Hello,

I am trying to figure out the difference between two time values.

The values are entered in medium time format.

8:00 AM and 10:15 AM but every time the value returned is 2.

Here is how I have it set up.

dtmTimeIn = Format(#8:00 AM#, "Medium Time")
dtmTimeOut = Format(#10:15 AM#, "Medium Time")

If IsDate(dtmTimeIn) And IsDate(dtmTimeOut) Then
intTime = DateDiff("n", dtmTimeIn, dtmTimeOut) / 60
Else
Exit Sub
End If

Me.txtD1Hours.Value = intTime

Why is this only returning 2? What am I missing?

-TFTH
Bryan
 
D

Douglas J. Steele

Let's hope he sees your answer, Paul, since he obviously didn't see the
response I'd posted about an hour before he reposted this question!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top