Time.Time

Overview | Methods | Fields | This Package | All Packages

Time.Time

Creates a Time object.

Syntax

public Time()

public Time( IDataStream stream )

public Time( double d )

public Time( long units )

public Time( Time t )

public Time( SYSTEMTIME st )

public Time( String s )

public Time( int year, int month, int day )

public Time( int year, int month, int day, int hour, int min, int sec )

public Time( Variant v )

Parameters

stream

An object that implements the IDataStream interface used to retrieve a date and time from persisted storage.

d

A double value that contains an OLE-formatted time value.

units

A long value that contains the time value to store in the new Time object.

t

A Time object to clone.

st

A Win32 SYSTEMTIME structure used to set the Time object.

s

A String object used to parse into the Time object.

year

An integer value that represents the year to set the Time object.

month

An integer value that represents the month to set the Time object.

day

An integer value that represents the day to set the Time object.

hour

An integer value that represents the hour to set the Time object. The hour must be specified in 24-hour format.

in

An integer value that represents the minute to set the Time object.

sec

An integer value that represents the second to set the Time object.

v

A com.ms.com.Variant object used to set the Time object.

Remarks

The Time class provides several constructors for creating a Time object. If you call the first version, the Time object that is created contains the current local time. If you have a time value that has been acquired from an OLE source, you can use the third version that accepts a double value to store the time and date properly. The eighth version defines a Time object based strictly on the date. The time fields in a Time object created with this version are initalized to midnight. The last version creates a Time object from a Variant object. Use this version to interact with time values from COM objects and ActiveX controls.