Time.StartOfHour

Time.StartOfHour is a Power Query M function that calculates the start of the hour for a given dateTime value. The function returns a time, datetime, or datetimezone value representing the start of the hour.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Time.StartOfHour( dateTime as any ) as any

Description

Returns the start of the hour represented by dateTime. dateTime must be a time, datetime or datetimezone value.

Examples

Find the start of the hour for October 10th, 2011, 8:10:32AM.

// Output: #datetime( 2011, 10, 10, 8, 0, 0 )
Time.StartOfHour( #datetime( 2011, 10, 10, 8, 10, 32 ) )

Other functions related to Time.StartOfHour are:

BI Gorilla Blog

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