if and statement

tubar

Registered User.
Local time
Today, 00:05
Joined
Jul 13, 2006
Messages
190
I have scratched my head on this for awhile...if the time out is 2:30pm it shows "18" if its 1am it shows "0" however 2am, 3am, 4am are all good...

Code:
If Me.Time_Out.Value >= ("12:00am") And Me.Time_Out.Value <= ("5:00am") Then
Me.appy_hours.Value = DateDiff("h", [Time_in], "12:00AM") + 24
Else
Me.appy_hours.Value = 0
End If
 

Users who are viewing this thread

Back
Top Bottom