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

Initializes a new DB2DateTime structure with a series of two 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, end as DB2TimeUnit)
[C#]
public DB2DateTime(Int32 numUnits1, Int32 numUnits2, DB2TimeUnit end);
[C++]
public: DB2DateTime(Int32 numUnits1, Int32 numUnits2, DB2TimeUnit end);
[JScript]
public function DB2DateTime(numUnits1 : Int32, numUnits2 : 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 higher granularity among the two time units for the DB2DateTime instance.
end
A DB2TimeUnit value to specify the time unit type of numUnits2 for the DB2DateTime instance.
The numUnits1 parameter and the numUnits2 parameter must be consecutive time units. For example, if the numUnits1 parameter is specified for a month, the numUnits2 parameter must be a day of the month, and the end parameter must specify a DB2TimeUnit value for the day.

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
}