Time.Hour is a Power Query M function that extracts the hour component from a given time, datetime, or datetimezone value. The function returns the hour component as a number.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Time.Hour( dateTime as any ) as nullable number
Description
Returns the hour component of the provided time
, datetime
, or datetimezone
value, dateTime
.
Examples
Find the hour in #datetime( 2011, 12, 31, 9, 15, 36 ).
// Output: 9
Time.Hour( #datetime( 2011, 12, 31, 9, 15, 36 ) )
Related functions
Other functions related to Time.Hour are:
