GetEffectiveDuration - Same date
I'm currently trying to calculate the number of days, hours and minutes between 2 dates - the date task is created (set in an activity event expression on enter of form - assigning DateTime.Now to "DateCreatedMain" Xpath) and the completion date - which is the DateTime.Now in the current expression.
So I have used this function:
<Workflowtask.PerformanceMeasurements.TimeCompletedMain> = CHelper.getEffectiveDuration(Me,<Workflowtask.ProcessDate.DateCreatedMain>,DateTime.Now);
CHelper.trace("Dur", "EffDur= "+<Workflowtask.PerformanceMeasurements.TimeCompletedMain>);
This is supposed to return the result in minutes, however, the result is always 0 - see trace below:
8/24/2018 1:02:05 PM: [EffDur= 0]
8/24/2018 1:02:05 PM: [Now= Fri Aug 24 12:58:30 UTC+0 2018 Created= Fri Aug 24 12:56:48 UTC +0]
There is roughly 2 minutes between the two dates, so why am I not getting 2 as the returned value?