F_INDMINUTESBETWEEN

<< F_MINUTESBETWEEN | IBExpert UDF Functions | F_INDMINUTESBETWEENTHR >>

F_INDMINUTESBETWEEN

 
  • function from adhoc
  • Compatible with UTF-8
  • Input TIMESTAMP (older) date optionally time 1, TIMESTAMP (newer) date optionally time 2
  • Output INTEGER difference in (integer) industryminutes between timestamp 1 and timestamp 2

Example

 select 800 as ISCORRECT, F_INDMINUTESBETWEEN('08.11.2018 16:00:00', '08.11.2018 08:00:00')
 from RDB$DATABASE
 union
 select 802 as ISCORRECT, F_INDMINUTESBETWEEN('08.11.2018 08:00:00', '08.11.2018 16:01:00')
 from RDB$DATABASE
 union
 select 808 as ISCORRECT, F_INDMINUTESBETWEEN('08.11.2018 08:00:00', '08.11.2018 16:05:00')
 from RDB$DATABASE
 union
 select 810 as ISCORRECT, F_INDMINUTESBETWEEN('08.11.2018 08:00:00', '08.11.2018 16:05:45')
 from RDB$DATABASE
 union
 select 818 as ISCORRECT, F_INDMINUTESBETWEEN('08.11.2018 07:55:00', '08.11.2018 16:05:30')
 from RDB$DATABASE
 union
 select 817 as ISCORRECT, F_INDMINUTESBETWEEN('08.11.2018 07:55:00', '08.11.2018 16:05:00')
 from RDB$DATABASE;

Expected results:

    ISCORRECT
 ============ ============
          800          800
          802          802
          808          808
          810          810
          817          817
          818          818

back to top of page
<< F_MINUTESBETWEEN | IBExpert UDF Functions | F_INDMINUTESBETWEENTHR >>