Find the difference in total hours based on two Date fields [solved]


#1

I thought this should be straight forward, but somehow it’s creating problems.
I have 2 date fields.
One to track what date and time work is started the other tracks time and date the work has finished.
Based on those to fields I need to find out how many hours is totally billable.

Though I could just minus the two - but I always seem to either get an #error or NaN

Anyone who can point me in the right direction?


#2

DATETIME_DIFF() works for me:

I’ve used 'hour' as the unit, but maybe you should use minutes and convert to hours to be able to bill the minutes too. I get NaN when a Date is not filled, ¿maybe there is your problem? You could check if there are the dates with IF() to avoid that.


#3

Thank you that works