OpenBI Docs Buy

#time

Builds a clock time out of three numbers: hour, minute, second.

Group: Dates and times. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

#time(hour as number, minute as number, second as number) as time
ParameterTypeDescription
hournumberThe hour, 0 to 23; 24 is allowed with minute and second 0, for the end of a day.
minutenumberThe minute, 0 to 59.
secondnumberThe second, 0 up to (not including) 60; it may have a fraction.

Returns

time. The time of day; an error when the numbers are out of range.

Remarks

  • A time has no date and no time zone. Adding a duration moves it along the clock.

Examples

A shop's opening time

#time(8, 15, 0)
#time(8, 15, 0)

An hour and a half later

#time(8, 15, 0) + #duration(0, 1, 30, 0)
#time(9, 45, 0)

Minutes past 59

#time(9, 75, 0)

Result: an error.

[Reason = "Expression.Error", Message = "The arguments of #time are not a valid time.", Detail = null]

The minute must be 0 to 59: write #time(10, 15, 0) instead.

#datetime, Time.From, Time.FromText, Time.Hour.

Last updated · OpenBI Studio 0.3.79