F_HOURSBETWEEN
<< F_WORKINGDAYSBETWEEN | IBExpert UDF Functions | F_MINUTESBETWEEN >>
F_HOURSBETWEEN
- compatibility to GrUDF
- Compatible with UTF-8
- Input TIMESTAMP (older) date optionally time 1, TIMESTAMP (newer) date optionally time 2
- Output INTEGER difference in (integer) hours between timestamp 1 and timestamp 2
Example
select 240 as ISCORRECT, F_HOURSBETWEEN('01.10.2018 15:01:03', '11.10.2018 15:04:03') from RDB$DATABASE union select 241 as ISCORRECT, F_HOURSBETWEEN('11.10.2018 16:04:04', '01.10.2018 15:01:03') from RDB$DATABASE union select null as ISCORRECT, F_HOURSBETWEEN(null, null) from RDB$DATABASE;
Expected results:
ISCORRECT ============ ============ <null> <null> 240 240 241 241
back to top of page
<< F_WORKINGDAYSBETWEEN | IBExpert UDF Functions | F_MINUTESBETWEEN >>