Hi Chester,
modify Log out formula as below,
if {loghistory.username}='ches' and
{loghistory.loggedin}<=datetimevalue(CurrentDate,Time (05,59 ,59 )) and
{loghistory.loggedout}>=datetimevalue(CurrentDate,Time (13,59 ,59 )) and
{actualguesting.paymentmode}='CASH' then
1
else
0
Place the above formula in Details section and hide it..
Right click on the Formula field and select Insert > SUmmary.
If you use Sum(totamout) field in If condition, then it will shows sum of all the records.
P.S: Do you need the exact Log in time <= 05:59 and Log out >= 13:59?
or if the employee works 8 hours per a day(any time log in and any time log out because if a user login befor 05:59(Ex: 4AM log in) and logs out before 13:59(12PM Logout) in this case employee total working hours are 8 but his records doesnot count?