Date.IsLeapYear

Date.IsLeapYear is a Power Query M function that indicates whether the given date(time) value falls in a leap year. The function returns a boolean value (true or false).

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

Syntax

Date.IsLeapYear( dateTime as any ) as nullable logical

Description

Indicates whether the given datetime value dateTime falls in is a leap year.

  • dateTime: A date, datetime, or datetimezone value to be evaluated.

Examples

Determine if the year 2012, as represented by #date( 2012, 01, 01 ) is a leap year.

// Output: true
Date.IsLeapYear( #date( 2012, 01, 01 ) )

Other functions related to Date.IsLeapYear are:

BI Gorilla Blog

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