Returns the day of the year as a number for a given date or date-time.
Function
result = dayofyear(input)
Arguments
Argument | Data Type |
input | date (datetime will be implicitly cast to date) |
---|---|
result | integer |
Comments
Returns the day of the year as a number from 1 to 366.
This function operates in the local time-zone if a datetime input is provided. See Dates, Times and Time Zones.
Examples
result = dayofyear(#2019-05-30#) /* result = 150 */
result = dayofyear(getdate())