Substract Time from Expression

Novice1

Registered User.
Local time
Today, 15:01
Joined
Mar 9, 2004
Messages
385
How do I subtract 1 hour from this expression? Thanks

=Int(Sum([MondayTimeOut]-[MondayTimeIn])) & Format(Sum([MondayTimeOut]-[MondayTimeIn]),"h"" hr ""n"" min """)
 
FWIW, in a VBA Date and Jet/ACE Date, 1 day = 1.0, so one hour = 1/24 (which is one day divided by 24 hours).
 
I hear you but I'm still clueless how to add the expression

=Int((Sum([MondayTimeOut]-[MondayTimeIn])) -.0416666) & Format(Sum([MondayTimeOut]-[MondayTimeIn]),"h"" hr ""n"" min """)
 
Is puting a add 1 hour in the after update of the MondayTimeOut date field worth a consideration ?

#Private Sub MondayTimeOut_AfterUpdate()
Me.MondayTimeOut = DateAdd("h", 1, MondayTimeOut)
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Text12.Requery

End Sub#
Just a thought
Regards Ypma
 
I would write an intermediate expression in a different control, since you are already doing this sum twice. Do the sum once in a hidden control, then in a different control add/subtract the time. You don't have to solve this whole thing in one expression. Get pieces of it working, then add more pieces. IMO.
 

Users who are viewing this thread

Back
Top Bottom