F_FIRSTDAYLASTWEEKISO

<< F_LASTDAYLASTWEEK | IBExpert UDF Functions | F_LASTDAYLASTWEEKISO >>

F_FIRSTDAYLASTWEEKISO

 
  • function from adhoc
  • Compatible with UTF-8
  • Input TIMESTAMP date optionally time
  • Output TIMESTAMP date of 1st day of last week (ISO)weekday (Sunday) as date with time 00:00:00

Example

 SELECT '21.01.2019' AS ISCORRECT, F_FIRSTDAYLASTWEEKISO('01.02.2019 15:00:00') FROM RDB$DATABASE;

Expected results:

 ISCORRECT      F_FIRSTDAYLASTWEEKISO
 ========== =========================
 21.01.2019 2019-01-21 00:00:00.0000

Example

 SELECT '24.12.2018' AS ISCORRECT, F_FIRSTDAYLASTWEEKISO('02.01.2019 15:00:00') FROM RDB$DATABASE;

Expected results:

 ISCORRECT      F_FIRSTDAYLASTWEEKISO
 ========== =========================
 24.12.2018 2018-12-24 00:00:00.0000

back to top of page
<< F_LASTDAYLASTWEEK | IBExpert UDF Functions | F_LASTDAYLASTWEEKISO >>