Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

VBScript Hour Function

VBScript Hour Function


VBScript reference manual Complete VBScript Reference Manual


The Hour function returns a number between 0 and 23 representing the hour of the day.

Syntax

Hour(time)

Parameters Description
time Required. Any expression representing a time.

Example

Example 1

The example above produces the following output:

13

Try it »

Example 2

The example above produces the following output:

document.write(Hour(Now()))

Try it »


VBScript reference manual Complete VBScript Reference Manual