The two-time subtraction can be done using both the “code” and the “design” method, which is given below with related explanations:

bpmAppService.HelperServices.DateTimeService.TimeDiff (input1, input2);
input1:, first time
input2: second time
Output: TimeSpan