Time.Hour Function in Power Query

The Time.Hour function in Power Query returns an hour value from a time/datetime value.

Syntax

Time.Hour(dateTime as any) as nullable number

The function has the parameter dateTime as any. It returns a number representing the hours part of the time.

Example: Extract the hour component.

Power Query M

let
    Source = Time.Hour(#time(20, 54, 25))
in
    Source   

The output of the above code is 20.