#time Function in Power Query
The #time function in Power Query is used to create a time value from hour, minute, and second components.
Syntax
#time(hour as number, minute as number, second as number) as time
The function has the following parameters:
- hour: An integer from 0 to 23.
- minute: An integer from 0 to 59.
- second: An integer from 0 to 59.
It returns a time value (of type time) in the format hh:mm:ss.
Example: Creates a time value.
Power Query M
let Source = #time(20, 54, 25) in Source
The output of the above code is 20:54:25.
Tip: Use Time.Hour, Time.Minute, and Time.Second to extract parts from a time value if needed.