DateTime.IsInPreviousHour Function in Power Query
The DateTime.IsInPreviousHour function in Power Query indicates whether the given datetime value occurs during the previous hour, as determined by the current date and time on the system.
Syntax
DateTime.IsInPreviousHour(dateTime as any) as nullable logical
- dateTime: A datetime, or datetimezone value to be evaluated.
Example: Determine if the hour before the current system time is in the previous hour.
Power Query M
let Source = DateTime.IsInPreviousHour(DateTime.FixedLocalNow() - #duration(0, 1, 0, 0)) 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 hour.