DateTime.ToRecord Function in Power Query
The DateTime.ToRecord function in Power Query returns a record containing parts of the given DateTime value.
Syntax
DateTime.ToRecord(dateTime as datetime) as record
- dateTime: A datetime value for from which the record of its parts is to be calculated.
Example: Convert the datetime value into a record containing Date and Time values.
Power Query M
let Source = DateTime.ToRecord(#datetime(2025,2,24,20,45,52)) in Source
The output of the above code is shown below:

Power Query M
[ Year = 2025, Month = 2, Day = 24, Hour = 20, Minute = 45, Second = 52 ]