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

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

The DB2DateTime constructor is available for use only with the Informix® 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, numUnits4 as Integer, end as DB2TimeUnit)
[C#]
public DB2DateTime(Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, Int32 numUnits4, DB2TimeUnit end);
[C++]
public: DB2DateTime(Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, Int32 numUnits4, DB2TimeUnit end);
[JScript]
public function DB2DateTime(numUnits1 : Int32, numUnits2 : Int32, numUnits3 : Int32, numUnits4 : 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 the next level of increased granularity from the numUnits2 time unit for a DB2DateTime instance.
numUnits4
An integer value to populate a specific time unit that has the highest granularity among the four units specified for a DB2DateTime instance.
end
A DB2TimeUnit value to specify the time unit type of numUnits4 for a DB2DateTime instance.
The numUnits1, numUnits2, numUnits3, and numUnits4 parameters must be consecutive time units. For example, if the numUnits1 parameter is specified for a month value, the numUnits2 parameter must specify a day value, the numUnits3 parameter must specify an hour value, and the numUnits4 parameter must specify a minute value. The end parameter must be a DB2TimeUnit minute value 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
}