F_AGEINDAYSTHRESHOLD
<< F_AGEINWEEKSTHRESHOLDNISO | IBExpert UDF Functions | F_AGEINDAYSTHRESHOLDN >>
F_AGEINDAYSTHRESHOLD
- compatibility to FreeUDFLib, FreeUDFLib AvERP
- Compatible with UTF-8
- Input TIMESTAMP (older) date optionally time 1, TIMESTAMP (newer) date optionally time 2, INTEGER min. value, INTEGER min. value is used (0 = no, 1 = yes), INTEGER max. value, INTEGER max. value is used (0 = no, 1 = yes)
- Output INTEGER difference in (integer) days between timestamp 1 and timestamp 2
Example
select 10 as ISCORRECT, F_AGEINDAYSTHRESHOLD('01.10.2018 15:01:03', '11.10.2018 15:01:03', 15, 0, 20, 0) from RDB$DATABASE union select 15 as ISCORRECT, F_AGEINDAYSTHRESHOLD('01.10.2018 15:01:03', '11.10.2018 15:01:03', 15, 1, 20, 0) from RDB$DATABASE union select 20 as ISCORRECT, F_AGEINDAYSTHRESHOLD('01.10.2018 15:01:03', '01.11.2018 15:01:03', 15, 0, 20, 1) from RDB$DATABASE union select 20 as ISCORRECT, F_AGEINDAYSTHRESHOLD('01.10.2018 15:01:03', '01.11.2018 15:01:03', 15, 1, 20, 1) from RDB$DATABASE union select 15 as ISCORRECT, F_AGEINDAYSTHRESHOLD('01.10.2018 15:01:03', '01.09.2018 15:01:03', 15, 1, -20, 1) from RDB$DATABASE union select -20 as ISCORRECT, F_AGEINDAYSTHRESHOLD('01.10.2018 15:01:03', '15.09.2018 15:01:03', 15, 0, -20, 1) from RDB$DATABASE union select null as ISCORRECT, F_AGEINDAYSTHRESHOLD(null, null, null, null, null, null) from RDB$DATABASE;
Expected results:
ISCORRECT ============ ============ <null> <null> -20 -20 10 10 15 15 20 20
back to top of page
<< F_AGEINWEEKSTHRESHOLDNISO | IBExpert UDF Functions | F_AGEINDAYSTHRESHOLDN >>