Obtain the difference between the two dates using two methods of “code” and “design”, given below with related explanations:

bpmAppService.HelperServices.DateTimeService.DateDiffGregorian (input1, input2);
input1: start date
input2: end date
Output: Date (TimeSpan)