Updated on

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


Time.StartOfHour( dateTime as any ) as any


Time.StartOfHour returns the start of the hour represented by dateTime. dateTime must be a time, datetime, or datetimezone value. This function pinpoints the beginning of an hour from the specified time value, returning a new time value set to the start of that hour.


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:

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