dayofyr(P)

Returns the integer value corresponding to the day of the year of a date-related value. (Available as of version 16.02)

Syntax

dayofyr(P)

Input

Argument Type Description
P any numeric type A scalar value or the name of a column containing date-related values
Valid values can be of the form:
  • date
  • date+time

For more information, see Dates and time.

Return Value

Returns an integer value representing the number of the day of the year of the input value.

For example, dayofyr(20191225) returns a value of 359, meaning that 12/25/2019 was the 359th day of 2019. dayofyr(20201225) returns a value of 360, since 2020 was a leap year.

If the input values are not in one of the supported formats listed above, the function returns an erroneous or illogical output.