@anon63144152 beat me to provide a solution related to round()
, so I just want to add that this function is indeed rounding the answer you’ve got, and not just truncating the hours.
Depending on your preferences, that could be exactly what you want (or not), but if you want something closer to truncating the decimal part, you could try something like: round(dur(this.Ended - date(now)).hours - 0.5)
which kind of cancels out the rounding effect.
As of now, there is no trunc()
available in dataview, so we’ll have to resort to this kind of trickery to achieve truncation, if that’s the wanted effect.