DateTime.IsInPreviousNMinutes Function in Power Query

The DateTime.IsInPreviousNMinutes function in Power Query indicates whether the given datetime value occurs during the previous number of minutes, as determined by the current date and time on the system.

Syntax

DateTime.IsInPreviousNMinutes(dateTime as any, minutes as number) as nullable logical

The function has the following parameters:

Example: Let’s the current date and time in my system is 7 April 2025 12:44 PM.

Power Query M

let
    Source = DateTime.IsInPreviousNMinutes(#datetime(2025,4,7,12,30,40), 40)
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.