Date.DayOfYear

Date.DayOfYear is a Power Query M function that returns a number representing the day of the year in the provided date, datetime, or datetimezone value. The function returns the day of the year as an integer.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Date.DayOfYear( dateTime as any ) as nullable number

Description

Returns a number representing the day of the year in the provided date, datetime, or datetimezone value, dateTime.

Examples

The day of the year for March 1st, 2011.

// Output: 60
Date.DayOfYear( #date( 2011, 03, 01 ) )

Learn more about Date.DayOfYear in the following articles:

Other functions related to Date.DayOfYear are:

BI Gorilla Youtube Channel

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/date-dayofyear
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.