DB2DateTime(Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, DB2TimeUnit end) Constructor

Initializes a new DB2DateTime structure with a series of three time units and a defined end time unit.

The DB2DateTime constructor is available for use only with theInformix® database server.

Namespace:
IBM.Data.DB2Types
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax


[Visual Basic]
Public Sub New(numUnits1 as Integer, numUnits2 as Integer, numUnits3 as Integer, end as DB2TimeUnit)
[C#]
public DB2DateTime(Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, DB2TimeUnit end);
[C++]
public: DB2DateTime(Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, DB2TimeUnit end);
[JScript]
public function DB2DateTime(numUnits1 : Int32, numUnits2 : Int32, numUnits3 : Int32, end : DB2TimeUnit);

Parameters

numUnits1
An integer value to populate a specific time unit for a DB2DateTime instance.
numUnits2
An integer value to populate a specific time unit that has the next level of increased granularity from the numUnits1 time unit for a DB2DateTime instance.
numUnits3
An integer value to populate a specific time unit that has highest granularity among the three units specified for a DB2DateTime instance.
end
A DB2TimeUnit value to specify the time unit type of numUnits3 for a DB2DateTime instance.
The numUnits1, numUnits2, and numUnits3 parameter must be consecutive time units. For example, if you specify the numUnits1 parameter for a month, you must specify a day of the month for the numUnits2 parameter and an hour for the numUnits3 parameter. The end parameter must specify DB2TimeUnit value of hour in this example.

Remarks

The DB2TimeUnit enumeration consists of following time units that make up the DB2DateTime structure:
public enum DB2TimeUnit
{
        Year        = 0,
        Month       = 2,
        Day         = 4,
        Hour        = 6,
        Minute      = 8,
        Second      = 10,
        Fraction1   = 11,
        Fraction2   = 12,
        Fraction3   = 13,
        Fraction4   = 14,
        Fraction5   = 15,
        Fraction    = 16
}