Time.Hour

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 ) )

Other functions related to Time.Hour are:

BI Gorilla Youtube Channel

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/time-hour
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.