If you subtract e.PanelDate from b.PanelDate you get 0,109895833331393 and then if you multiple that by 24 you get around 2,64
so the result is correct according to the way you are doing the calculation
The 2,64 is correct (2,64 hours = 2 hours 37 minutes)
If you want to show 2hrs and 38 minutes then take a look at this linkhttp://allenbrowne.com/ (...)
Hey terry.and thanks for your answer :-)
I found the solution..
SELECT Format(b.PanelDate,"dd/mm-yyyy") AS dato, format(sum(e.PanelDate-b.PanelDate),"hh:mm:ss") AS Total, IIf([Total]>"08:00:00", format(DATEADD("h",-8,[Total]),"hh:mm:ss") ,[Total]=Null) AS Overtid, IIf(Weekday([dato],2)=6 Or Weekday([dato],2)=7,[Total],Null) AS Weekend
FROM Registreringer AS b, Registreringer AS e
WHERE (((e.Paneldate)=(select min(Paneldate) from Registreringer where G=True and PanelDate >b.PanelDate)) AND ((b.K)= True))
GROUP BY Format(b.PanelDate,"dd/mm-yyyy");
great, thanks for the points.