1 Reply Latest reply on Feb 18, 2014 6:08 AM by philmodjunk

    Timesheet calculation



      Timesheet calculation


           I am trying to create a timesheet i have 4 fields (AMTimeIn, AMTimeOut, PMTimeIn, PMTimeOut) everything works great until one of the fields is left empty. EX: 6:30AM to 12:00PM 12:30PM to 3:00PM will result in 8 hours worked. but if one of the fields is left blank it miscalculates the total hours worked. any suggestions would be greatly appreciated...thx

        • 1. Re: Timesheet calculation

               If ( Not Isempty ( AmTimeOut ) And Not IsEmpty ( AMTimeIn ) ; AMTimeOut - AMTimeIn )

               will compute the elapsed time in seconds. (And you can easily divide to convert to hours) If either field is empty, no elapsed time is computed.