Date.IsInYearToDate

This function determines if the provided dateTime value falls within the current year and is on or before the current day, based on the system's current date and time. The dateTime parameter can be ei...

Syntax

Date.IsInYearToDate(dateTime as any) as nullable logical

About

This function determines if the provided dateTime value falls within the current year and is on or before the current day, based on the system's current date and time. The dateTime parameter can be either a date, datetime, or datetimezone value.

Explanation

Check if the current time of the system falls within the current year. Utilize the Power Query function MDate.IsInYearToDate(DateTime.FixedLocalNow()) to obtain the output, which should be true.