Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

VBScript Hour Function

Returns a whole number between 0 and 23, inclusive, representing the hour of the day.

Syntax: VBScript Hour Function

Hour(time)

Arguments: VBScript Hour Function

time

Any expression that can represent a time. If time contains Null, Null is returned.

Remarks: VBScript Hour Function

The following example uses the Hour function to obtain the hour from the current time:

Dim MyTime, MyHour

MyTime = Now

MyHour = Hour(MyTime) ' MyHour contains the number representing

                      ' the current hour.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.