Date.StartOfYear

Updated on

Date.StartOfYear is a Power Query M function that returns the start of the year that contains the specified date(Time). Your input must be a date, datetime, or datetimezone value.

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

Syntax

Date.StartOfYear( dateTime as any ) as any

Description

Date.StartOfYear finds the start of the year for a given dateTime parameter (of type date, datetime, or datetimezone).

Examples

Find the start of the year for October 10th, 2011, 8:10:32AM.

// Output: #datetime( 2011, 1, 1, 0, 0, 0 )
Date.StartOfYear( #datetime( 2011, 10, 10, 8, 10, 32 ) )

Learn more about Date.StartOfYear in the following articles:

Other functions related to Date.StartOfYear are:

BI Gorilla Blog

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/date-startofyear