Date.Year

Date.Year is a Power Query M function that returns the year component of the provided date(time) value.

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

Syntax

Date.Year( dateTime as any ) as nullable number

Description

Returns the year component of the provided datetime value, dateTime.

Examples

Find the year in #datetime( 2011, 12, 31, 9, 15, 36 ).

// Output: 2011
Date.Year( #datetime( 2011, 12, 31, 9, 15, 36 ) )

Learn more about Date.Year in the following articles:

Other functions related to Date.Year 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-year
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.