Date.IsInNextDay

This function checks if the provided date and time value, dateTime, falls on the next day based on the current date and time of the system. It is important to note that this function will return false...

Syntax

Date.IsInNextDay(dateTime as any) as nullable logical

About

This function checks if the provided date and time value, dateTime, falls on the next day based on the current date and time of the system. It is important to note that this function will return false if dateTime falls within the current day. The parameter dateTime could be a date, time, or time with timezone value that needs to be assessed.

Explanation

To ascertain whether the day after the current system time falls within the next day, the Power Query function MDate.IsInNextDay is utilized. This function takes the current date and time (obtained through DateTime.FixedLocalNow()) and adds one day to it (using Date.AddDays()). The output of this operation will be either true or false, indicating whether the next day is the day after the current system time.