F_DAYOFYEAR

<< IF_DLST: Daylight saving time | IBExpert UDF Functions | F_DAYOFMONTH >>

F_DAYOFYEAR

 

substitutable with EXTRACT(YEARDAY FROM ...)

F_EXTRACTYEARDAY

  • compatibility to FreeUDFLib, FreeUDFLibC, FreeUDFLib AvERP, GrUDF input/output-compatibility to rFunc (EXTRACTYEARDAY)
  • Compatible with UTF-8
  • Input TIMESTAMP date optionally time
  • Output INTEGER number of days (day number x of the year) up to the selected timestamp

F_DAYOFYEAR: counting starts with 1 F_EXTRACTYEARDAY: counting starts with 0

Example

 select 326 as ISCORRECT, F_DAYOFYEAR('22.11.2018')
 from RDB$DATABASE
 union
 select null as ISCORRECT, F_DAYOFYEAR(null)
 from RDB$DATABASE
 union
 select 325 as ISCORRECT, F_EXTRACTYEARDAY('22.11.2018')
 from RDB$DATABASE;

Expected results:

    ISCORRECT
 ============ ============
       <null>       <null>
          325          325
          326          326

back to top of page
<< IF_DLST: Daylight saving time | IBExpert UDF Functions | F_DAYOFMONTH >>