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
: Adate
,datetime
, ordatetimezone
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 ) )
Related functions
Other functions related to Date.IsLeapYear are:
