Using Version: 7.1.2.2 (x86) / LibreOffice Community - Windows 10.0
Embedded HSQLDB with a Query example from this form gives an interesting correct answer to the “EndTime - StartTime” question: 4::00 PM - 1:15 PM shows 3 hours LESS 15 minute where one would expect to see 2:45.
Embedded Firebird doe not recognize HOUR or MINUTE, and I have not understood the Language Reference. Please point me in the right direction. Thank you. My Query:
![/* Based on ask.libreoffice.org/en/question/48800/base-report-time-difference-function/ */
SELECT "StartTime", "EndTime",
CONCAT( CONCAT( "hours", ':' ), ( "minutes" - ( "hours" * 60 ) ) ) "DiffTime"
FROM (
SELECT "PriKey", "StartTime", "EndTime", ( HOUR( "EndTime" ) - HOUR( "StartTime" ) ) * 60 +
( MINUTE( "EndTime" ) - MINUTE( "StartTime" ) ) "minutes",
( ( HOUR( "EndTime" ) - HOUR( "StartTime" ) ) * 60
+ ( MINUTE( "EndTime" ) - MINUTE( "StartTime" ) ) ) / 60 "hours"
FROM "Table1"
) AS "subquery"
Firebird is on the left, HSQLDB is on the right.