Time.Hour

Updated on

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

Time.Hour extracts the hour component of the provided time, datetime, or datetimezone value, dateTime returns it as a number.

Examples

Find the hour in #datetime( 2011, 12, 31, 9, 15, 36 ).

// Output: 9
Time.Hour( #datetime( 2011, 12, 31, 9, 15, 36 ) )

Other functions related to Time.Hour are:

BI Gorilla Youtube Channel

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/time-hour