F_DAYOFWEEK
<< F_DAYOFMONTH | IBExpert UDF Functions | F_DAYSOFMONTH >>
F_DAYOFWEEK
substitutable with EXTRACT(WEEKDAY FROM ...)
F_EXTRACTWEEKDAY input/output-compatibility to rFunc (EXTRACTWEEKDAY)
F_DOW input/output-compatibility to rFunc (DOW)
- compatibility to FreeUDFLib, FreeUDFLibC, FreeUDFLib AvERP, GrUDF
- Compatible with UTF-8
- Input TIMESTAMP date optionally time
- Output INTEGER day of the week as integer
F_DAYOFWEEK: Sunday = 1, Monday = 2, Thuesday = 3, Wednesday = 4, Thursday = 5, Friday = 6, Saturday = 7 F_EXTRACTWEEKDAY: Sunday = 0, Monday = 1, Thuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6 F_DOW: Sunday = 7, Monday = 1, Thuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6
Example
select 1 as ISCORRECT, F_DAYOFWEEK('25.11.2018') from RDB$DATABASE union select null as ISCORRECT, F_DAYOFWEEK(null) from RDB$DATABASE;
Expected results:
ISCORRECT ============ ============ <null> <null> 1 1
Example
SELECT 0 AS ISCORRECT, F_EXTRACTWEEKDAY('25.11.2018') FROM RDB$DATABASE;
Expected results:
ISCORRECT F_EXTRACTWEEKDAY ============ ================ 0 0
Example
SELECT 7 AS ISCORRECT, F_DOW('25.11.2018') FROM RDB$DATABASE;
Expected results:
ISCORRECT F_DOW ============ ============ 7 7
back to top of page
<< F_DAYOFMONTH | IBExpert UDF Functions | F_DAYSOFMONTH >>