DateTime.IsInNextNMinutes Function in Power Query
The DateTime.IsInNextNMinutes function in Power Query indicates whether the given datetime value occurs during the next number of minutes, as determined by the current date and time on the system.
Syntax
DateTime.IsInNextNMinutes(dateTime as any, minutes as number) as nullable logical
The function has the following parameters:
- dateTime: A datetime, or datetimezone value to be evaluated.
- minutes: The number of minutes.
Example: Determine if the minute after the current system time is in the next two minutes.
Power Query M
let Source = DateTime.IsInNextNMinutes(DateTime.FixedLocalNow() + #duration(0, 0, 2, 0), 10) in Source
The output of the above code is TRUE.
Note: This function will return false when passed a value that occurs within the current minute.