day of year

Prev Next

Function Names

day of year

Description

This function returns the day of year. 0 is returned if the input value contains no recognizable date.

Vectorization: This function supports vectorization in the 1st function parameter. Instead of providing a single value, you can provide a set or even a nested set which contain multiple values. The function will then process every value and its return value contains a corresponding set containing all results.

Call as: function

Restrictions

Indirect parameter passing is disabled
Vectorization is allowed in the 1st function parameter

Parameter count

1

Parameters

No.TypeDescription
1
input
date or string converted to date
set
Date

Value to extract as described above. Vectorization: Put multiple values into a (nested) set.

Return value

TypeDescription
numeral
set
Result

Returned value as described above. If vectorization is applied, then a parameter containing multiple values are returned.

Examples

               echo( day of year( 31.12.2019 ), ", ", day of year( 31.12.2020 ), ", ", day of year( "" ) );

Output

365, 366, 0
Try it yourself: Open LIB_Function_day_of_year.b4p in B4P_Examples.zip. Decompress before use.

See also

Date info functions