Date.IsLeapYear
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns a logical value indicating whether the year portion of a DateTime value is a leap year.
Date.IsLeapYear(dateTime as nullable datetime) as nullable logical
| Argument | Description |
|---|---|
| dateTime | The DateTime to check. |
Date.IsLeapYear(DateTime.FromText("2011-01-01")) equals false
Date.IsLeapYear(DateTime.FromText("2012-01-01")) equals true
Show: