O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Hour Function

Syntax

Hour(time)
time

Use: Required

Data Type: Any expression that can be converted to a date.

Any valid time expression.

Return Value

A variant of data type Integer representing the hour of the day.

Description

Extracts the hour element from a time expression.

Rules at a Glance

  • Hour returns a whole number between 0 and 23, representing the hour of a 24-hour clock.

  • If time contains Null, Null is returned.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required