Using DATETIME_DIFF with HOURS and DECIMAL rounds to whole number

It appears that the DATETIME_DIFF() function rounds down to a whole integer when specifying hours regardless of it decimal is specified to two places.

I am also searching for this solution. Is this actually a bug? Or is there a way to format the formula to return the difference between the two times in hours and minutes? Or fractions of hours expressed as a two decimal place number? I would like to be able to total the sum of hours and minutes worked in the summary bar as well.

I have searched around a lot, but haven’t found any resources specifying how to get this result with the datetime_diff formula.

Thanks in advance for the help.

Just following up with an additional idea, which seems like it will work for my needs:
DATETIME_DIFF({End Date-Time}, {Start Date-Time}, ‘minutes’) / 60

But I am still curious if there are other ways to specify the format of hours and minutes within the datetime_diff formula.


Thanks! It just did the trick for me.

Following up on this question:

I have 2 date fields: “start” and “stop”. Both in European timezone and 24h time format (“same time zone for all…”). 3th field is a formula field to calculate the difference in hours between start and stop (to register hours for labour workers): “DATETIME_DIFF(Einde,Start,‘HH:mm’)/3600000” (format: “decimal”; 1.00 precision).

Question: if I don’t add the “/360000” it doesn’t return eg 2.5h, but only the full hours (2h or 3h). Why? What am I missing here? Why do we have to use this workaround and how can it be 360000 for 2,5h?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.