VB.NET Language in a Nutshell

   
Hour Function

Class

Microsoft.VisualBasic.DateAndTime

Syntax

Hour( timevalue )

timevalue (required; date)

Date variable or literal date

Return Value

An Integer from 0 to 23, specifying the hour of the day

Description

Extracts the hour element from a time expression

Example

The line:

MsgBox(Hour(#1:33:00 PM#))

displays the number 13.

Rules at a Glance

See Also

Minute Function, Second Function

   

Категории