F_AGEINWEEKSNISO

<< F_AGEINWEEKSN | IBExpert UDF Functions | F_AGEINDAYS >>

F_AGEINWEEKSNISO

 
  • 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) weeks between timestamp 1 and timestamp 2

if you want <null> if the first date is newer than the second date. ISO-version of F_AGEINWEEKS. Monday is 1st day of week. If the two dates are in the same week, the return value is 0.

Example

  SELECT null AS ISCORRECT, F_AGEINWEEKSNISO('01.01.2019 15:01:21','15.05.2018 15:01:21') FROM RDB$DATABASE;

Expected results:

 ISCORRECT F_AGEINWEEKSNISO
 ========= ================
 <null>              <null>

back to top of page
<< F_AGEINWEEKSN | IBExpert UDF Functions | F_AGEINDAYS >>