DateTime.Time Function in Power Query
The DateTime.Time function in Power Query extracts the time portion from a datetime value, returning it as a time value.
Syntax
DateTime.Time(dateTime as any) as nullable time
Example: Extract the time component.
Power Query M
let Source = DateTime.Time(#datetime(2025,4,24,5,25,50)) in Source
The output of the above code is 05:25:50. In the code format it looks like #time(5, 25, 50).
Related Functions
- DateTime.Date - Extracts the date portion from a datetime value.