Question about Time Difference

Dear Team,

How do I Calculate the time duration between two times.

Example:

TimeOfVisit : 10h

EndTimeOfVisit : 12h

Expected Result: visit Duration : 2h

The type of the properties TimeOfVisit and EndTimeOfVisit isTimeOfDay

and the type of visit Duration is Integer.

If any one of you have any suggestions on this is much appreciated.

Thank you

@MarwaB19

The TimeOfDay control accepts the format hhmmss. You can calculate the duration in hours between two times in two ways:

  1. Extract the hours from both properties and assign them to parameters (of type integer). Then, perform a subtraction operation and map the result to the Duration property.

  2. Use the FormatDateTime function to format both input properties (TimeOfVisit and EndTimeOfVisit). Use these formatted values in the DateTimeDifference function to get the difference in hours.