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 ) )
Related functions
Other functions related to Time.StartOfHour are:
