DateTime.IsInPreviousHour

This function determines if the dateTime value provided is within the previous hour based on the current date and time of the system. Please note that if the value falls within the current hour, the f...

Syntax

DateTime.IsInPreviousHour(dateTime as any) as nullable logical

About

This function determines if the dateTime value provided is within the previous hour based on the current date and time of the system. Please note that if the value falls within the current hour, the function will return false. The dateTime parameter should be a datetime or datetimezone value for evaluation.

Explanation

Verify if the time one hour prior to the current system time falls within the previous hour. Function Used Power Query MDateTime.IsInPreviousHour(DateTime.FixedLocalNow() - #duration(0, 1, 0, 0)) Result The output will be 'true'.