תוכן
\<bookmark_value\>Hour function\</bookmark_value\>

# Hour Function

Returns the hour from a time value that is generated by the TimeSerial or the TimeValue function.

## Syntax:

    Hour (Number)

## Return value:

Integer

## Parameters:

\<emph\>Number:\</emph\> Numeric expression that contains the serial time value that is used to return the hour value.

This function is the opposite of the \<emph\>TimeSerial\</emph\> function. It returns an integer value that represents the hour from a time value that is generated by the \<emph\>TimeSerial\</emph\> or the \<emph\>TimeValue \</emph\>function. For example, the expression

Print Hour(TimeSerial(12,30,41))

returns the value 12.

### Error codes:

5 Invalid procedure call

## Example:

              Sub ExampleHour
              Print "The current hour is " & Hour( Now )
              End Sub

נא לתמוך בנו!