Please help me do the following calculation for each month time sheet. In my database query, I have the following fields, StaffID, StartTime, EndTime and TotalHours. TotalHours is calculated by finding the time difference between EndTime and StartTime. Now, I want to be able to calculate the sum of TotalHours for each employee every month, either by the user specifying monthly dates say; December or (1/12/2009 to 31/12/2009), January or (1/01/2009 to 31/01/2009), February or (1/02/2009 to 28/12/2009)........ I really appreciate your help.
Regards,