Your question is not clear to me. You did not mention in what format you are storing your dutytime. However, assuming it as 24-hour format you may use the following query which will give you the result TIMEIN_DIFF in day.