DayOfYear (PQL)

Returns an integer, in the range 1–366 that represents the day of the year, where 1 is January 1

  • Returned Output: Numeric
  • Library: PQL \ Granular \ Date-Time
  • Version: 2025.00.000
  • Compatibility: Pyramid Query Language (PQL) data sources

Syntax

DayOfYear( <Column DateTime> )

* Click on the function's arguments above for more details on the input values.

Comments
  • The column needs to be an attribute with date-time values in the model. (The data type needs to be 'date-time.')
  • The value returned is based on a natural calendar period.
  • For details on how to employ and use this function see the custom column overview.
Different Function types
  • This function is similar to the PQL common functions of the same name. However, it operates on a column directly at the grain.
  • As a granular function, it is used in the base SQL query itself.

Examples

This example returns a column containing the day number of the year:

DayOfYear([Ship Date])