DB2DateTime members

List of the DB2DateTime structure members.

The DB2DateTime members are available for use only with the Informix® database server.

Public fields

Field Description
public field Null Defines the null value for the DB2DateTime structure.
public field MaxValue Defines the maximum value for the DB2DateTime structure.
public field MinValue Defines the minimum value for the DB2DateTime structure.

Public constructors

Constructor Description
public method DB2DateTime() Initializes a new DB2DateTime that is set to null.
public method DB2DateTime(int year, int month, int day, int hour, int minute, int second, int microsecond) Initializes a new DB2DateTime structure with the specified integer values.
public method DB2DateTime(int year, int month, int day, int hour, int minute, int second, Int64 picosecond) Initializes a new DB2DateTime structure with the specified integer values.
public method DB2DateTime(int year, int month, int day, int hour, int minute, int second, Int64 picosecond, int precision) Initializes a new DB2DateTime structure with the specified integer values.
public method DB2DateTime(DateTime value) Initializes a new DB2DateTime structure with the specified DateTime value.
public method DB2DateTime(DateTime value, int precision) Initializes a new DB2DateTime structure with the specified DateTime object and integer precision values.
public method DB2DateTime(Int64 ticks) Initializes a new DB2DateTime structure with the specified ticks since midnight on 1 Jan 0001.
public method DB2DateTime(Int32 numUnits, DB2TimeUnit unit) Initializes a new DB2DateTime structure with a single time unit.
public method DB2DateTime( Int32 numUnits1, Int32 numUnits2, DB2TimeUnit end) Initializes a new DB2DateTime structure with a series of two time units and a defined end time unit.
public method DB2DateTime( Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, DB2TimeUnit end) Initializes a new DB2DateTime structure with a series of three time units and a defined end time unit.
public method DB2DateTime( Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, Int32 numUnits4, DB2TimeUnit end) Initializes a new DB2DateTime structure with a series of four time units and a defined end time unit.
public method DB2DateTime( Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, Int32 numUnits4, Int32 numUnits5, DB2TimeUnit end) Initializes a new DB2DateTime structure with a series of five time units and a defined end time unit.
public method DB2DateTime( Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, Int32 numUnits4, Int32 numUnits5, Int32 numUnits6, DB2TimeUnit end) Initializes a new DB2DateTime structure with a series of six time units and a defined end time unit.
public method DB2DateTime( Int32 numUnits1, Int32 numUnits2, Int32 numUnits3, Int32 numUnits4, Int32 numUnits5, Int32 numUnits6, Int32 numUnits7, DB2TimeUnit end) Initializes a new DB2DateTime structure with a series of seven time units and a defined end time unit.

Cast operators

Cast operator Description
public operator public static explicit operator DateTime (DB2DateTime source) Casts a DB2DateTime structure to a DateTime data type.
public operator public static explicit operator DB2DateTime (DateTime source) Casts aDateTime data type to a DB2DateTime structure.
public operator public static explicit operator DB2TimeStamp (DB2DateTime source) Casts aDB2DateTime structure to a DB2TimeStamp structure.
public operator public static explicit operator DB2DateTime (DB2TimeStamp source) Casts a DB2TimeStamp structure to a DB2DateTime structure.

Public methods

Method Description
public method AddDays(Double days) Adds specified days to the DB2DateTime instance.
public method AddHours(Double hours) Adds specified hours to the DB2DateTime instance.
public method AddMilliseconds(Double milliseconds) Adds specified milliseconds to the DB2DateTime instance.
public method AddMinutes(Double minutes) Adds specified minutes to the DB2DateTime instance.
public method AddMonths(Int32 months) Adds specified months to the DB2DateTime instance.
public method AddSeconds(Double seconds) Adds specified seconds to the DB2DateTime instance.
public method AddTicks(Int64 ticks) Adds specified ticks to the DB2DateTime instance.
public method AddYears(Int32 years) Adds specified years to the DB2DateTime instance.
public method Compare(DB2DateTime db2DT1, DB2DateTime db2DT2) Determines whether one DB2DateTime instance value is earlier, later, or the same as another DB2DateTime instance value.
public method CompareTo(object obj) Determines whether the specified object value is earlier, later, or the same as the DB2DateTime instance value.
public method DaysInMonth(Int32 year, Int32 month) Returns the number of days that are in the specified month of the year.
public method Equals(DB2DateTime db2DT1, DB2DateTime db2DT2) Determines whether one DB2DateTime instance value is equal to another DB2DateTime instance value.
public method GreaterThan(DB2DateTime db2DT1, DB2DateTime db2DT2) Determines whether one DB2DateTime instance value is later than another DB2DateTime instance value.
public method GreaterThanOrEqual(DB2DateTime db2DT1, DB2DateTime db2DT2) Determines whether one DB2DateTime instance value is the same or later than another DB2DateTime instance value.
public method LessThan(DB2DateTime db2DT1, DB2DateTime db2DT2) Determines whether one DB2DateTime instance value is earlier than another DB2DateTime instance value.
public method LessThanOrEqual(DB2DateTime db2DT1, DB2DateTime db2DT2) Determines whether one DB2DateTime instance value is the same or earlier than another DB2DateTime instance value.
public method NotEquals(DB2DateTime db2DT1, DB2DateTime db2DT2) Determines whether one DB2DateTime instance value is earlier or later than another DB2DateTime instance value.
public method Parse(String szDateTime) Returns a new DB2DateTime structure value that is based on the szDateTime string.
public method Parse(String szDateTime, int precision) Returns a new DB2DateTime structure value that is based on the szDateTime string and specified precision value.
public method ToString() Returns the value of the DB2DateTime instance as a string.

Public properties

Property Description
public property Date Gets the date value that is stored in the DB2DateTime structure.
public property Day Gets the day value that is stored in the DB2DateTime structure.
public property EndTimeUnit Gets the end time unit that is stored in the DB2DateTime instance.
public property Hour Gets the hour value that is stored in the DB2DateTime structure.
public property IsNull Gets a value that indicates whether the value that is stored in the DB2DateTime structure is null.
public property Millisecond Gets the millisecond value that is stored in the DB2DateTime structure.
public property Minute Gets the minute value that is stored in the DB2DateTime instance.
public property Month Gets the month value that is stored in the DB2DateTime instance.
public property Now Gets current date and time value.
public property Precision Gets a precision value of the DB2DateTime structure value.
public property Second Gets the second value that is stored in the DB2DateTime instance.
public property StartTimeUnit Gets the first time unit that is stored in the DB2DateTime instance.
public property Ticks Returns the number of ticks since midnight on 1 January 0001 to the time that is specified in the DB2DateTime instance.
public property Today Gets the current date value.
public property Value Gets the value that is stored in the DB2DateTime structure.
public property Year Gets the year value that is stored in the DB2DateTime instance.