Updated on

Time.ToRecord is a Power Query M function that converts a time value into a record containing its parts. The function returns a record with the parts of the given time value.

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


Time.ToRecord( time as time ) as record


Time.ToRecord takes a time value and decomposes it into a detailed record. Specifically, it processes a time input and outputs a record format that includes the individual components of the time value, such as hours, minutes, and seconds.


Convert the #time( 11, 56, 2 ) value into a record containing Time values.

Time.ToRecord( #time( 11, 56, 2 ) )

 /* Output: 
      Hour = 11,
      Minute = 56,
      Second = 2

Other functions related to Time.ToRecord are:

BI Gorilla Blog

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