F_FIRSTDAYKW

<< F_LASTDAYWOY | IBExpert UDF Functions | F_LASTDAYKW >>

F_FIRSTDAYKW

 
  • function from adhoc
  • Compatible with UTF-8
  • Input INTEGER week number, INTEGER year
  • Output TIMESTAMP Date with 1st day of (ISO)week of the year as date with time 00:00:00

Example

 SELECT '28.12.2015' AS ISCORRECT, F_FIRSTDAYKW(53, 2015) FROM RDB$DATABASE;

Expected results:

 ISCORRECT               F_FIRSTDAYKW
 ========== =========================
 28.12.2015 2015-12-28 00:00:00.0000

Example

 SELECT '04.01.2016' AS ISCORRECT, F_FIRSTDAYKW(1, 2016) FROM RDB$DATABASE;

Expected results:

 ISCORRECT               F_FIRSTDAYKW
 ========== =========================
 04.01.2016 2016-01-04 00:00:00.0000

Example

 SELECT '30.04.2018' AS ISCORRECT, F_FIRSTDAYKW(18, 2018) FROM RDB$DATABASE;

Expected results:

 ISCORRECT               F_FIRSTDAYKW
 ========== =========================
 30.04.2018 2018-04-30 00:00:00.0000

Example

 SELECT '26.03.2018' AS ISCORRECT, F_FIRSTDAYKW(13, 2018) FROM RDB$DATABASE;

Expected results:

 ISCORRECT               F_FIRSTDAYKW
 ========== =========================
 26.03.2018 2018-03-26 00:00:00.0000

Example

 SELECT NULL AS ISCORRECT, F_FIRSTDAYKW(NULL, NULL) FROM RDB$DATABASE;

Expected results:

 ISCORRECT              F_FIRSTDAYKW
 ========= =========================
 <null>                       <null>

back to top of page
<< F_LASTDAYWOY | IBExpert UDF Functions | F_LASTDAYKW >>