您请求访问的页面目前没有您的语言版本。您可以从页面底部选择其他语言,或使用 Google Chrome 的内置翻译功能将网页内容即时翻译成您选择的语言。

HOUR()

Count of hours from Duration

Returns the number of hours (Number value) represented by the given duration of time.

Sample usage

HOUR("007:14:21") : 7

HOUR(TIMENOW() - "00:00:00") returns hours since midnight; the current hour of the day. See also: TIMENOW()

HOUR((TODAY() + 1) - NOW()) returns hours until midnight. See also: NOW(), TODAY().

HOUR((DATETIME(TODAY() + 1) + "009:00:00") - NOW()) returns hours until 9:00 AM tomorrow. See also: DATETIME()

HOUR([Event Time] - NOW()) returns hours until the event time.

HOUR([Event Time] - [_THISROW].[Event Time]) returns hours between two event times.

Common problems

HOUR(NOW()) (or any DateTime or Time value in place of NOW()) causes Expression Assistant to complain, Parameter 1 of function HOUR is of the wrong type. The argument must be a Duration value, not a DateTime or Time value. To fix, convert a DateTime value to a Time value with TIME(), then subtract a zero time to convert a Time value to a Duration value: HOUR(TIME(NOW()) - "00:00:00"). See also: NOW(), TIME()

Syntax

HOUR(duration)

  • duration - A Duration value.

Notes

HOUR(...) is equivalent to (NUMBER(INDEX(SPLIT(TEXT(...), ":"), 1)) + 0) when ... is a Time value. See also: INDEX(), NUMBER(), SPLIT(), TEXT().

See also

Date and time expressions

MINUTE()

SECOND()

Was this helpful?

How can we improve it?
true
Search
Clear search
Close search
Main menu
3111492949662267672
true
Search Help Center
false
true
true
true
false
false
false
false
false
⌂ 换网址