Hi I am having an issue where incorrect calculation is given from a 'time elapsed' calculation, but only sometimes.
I've got two DateTime fields, first field as start time and second field as end time. I've used decimal date calculation formula for elapsed time int((decimal-date-time(${endtime}) - decimal-date-time(${starttime})) * 24*60) to give the answer in a separate viewable field.
The calculation formula works correctly most of the time - but sometimes, the formula returns an answer minus 1, as you can see in the images below.
<<< Incorrect, should be returning 3



Correct >>>
<<< Correct
Incorrect, should be returning 8 >>>
There don't seem to be any specific pattern to which elapsed minutes result will return an incorrect result. For example, with start time 12:00pm, incorrect results were returned for 3, 8, 11 etc minutes elapsed but when start time was 12:01pm, different numbers of minutes elapsed returned incorrect results. Has anyone had an issue like this?
Additional question - I have a DateTime field set to display today() as default and 'Required'. However I would like to have the time section display as blank (it displays defaults of 12:00), to force all respondents to manually enter in the time (their time entries will never be now(), or able to be calculated) and minimise any possibility of accidentally not entering time data or respondents being lazy. Is this possible? I would rather retain the DateTime and not have a separate Time field.
Thanks!