I have a Nintex form with the following fields:
In Prior Date & Time Relieved: the first control is the standard datepicker and the remaining two are choice controls for hours (0-23) and minutes (0-59). The same thing applies for Date & Time: Time on Duty.
Is there a way I can concatenate the date, hours and minutes values for both the highlighted fields to represent a date with hours and minutes (for eg: 07/16/2019 03:49)? If yes, can I subtract these values to show the difference in hours and minutes? The requirement is to subtract Prior Date & Time Relieved from Date & Time: Time on Duty as follows:
if Prior Date & Time = 07/16/2019 15:00 and Date & Time: Time on Duty = 07/16/2019 16:00, the calculated value should show 01:00.
I know we can subtract dates using 'datediffHours' and 'datediffMinutes' inline functions with the standard datetime picker control, but it only supports 5 minutes increments and I need 1 minute time increment.
Please let me know if this could be done.
Solved! Go to Solution.
I have put together a sample form for you and attached it.
I concatenate the Date from the date control and the hours and minutes from the dropdowns using the Date runtime function in a calculated value control.
This is done for both dates and times and then you can use one of the datediff functions to get the total days, hours or minutes difference by comparing the two calculated value controls.
Sample of the function that concatenates the 3 controls.