com.informix.jdbc

## Class IfxDate

- java.lang.Object
- - com.informix.jdbc.IfxObject
  - - com.informix.jdbc.IfxDate

    public class IfxDate
    extends IfxObject

Support for date datatypes. This class derived from IfxObject class.

See Also:
  `IfxObject`

### Field Summary

Fields
`static int` `IFX_DATE_NULL`

### Fields inherited from class com.informix.jdbc.IfxObject

`conn, encodedLength, extendedID, extendedName, extendedOwner, ifxType, isNull, jdbcType, sourceType, trace, typeMap, used_in_update`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(java.lang.Object other)` Find out whether two objects are equal.
`void` `fromDate(java.sql.Date date)`
`void` `fromIfx(byte[] b)` Set value of this data type to the given Informix network format
`void` `fromIfx(byte[] b, int offset, int length)` Set value of this data type to the given Informix network format
`void` `fromString(java.lang.String str)` Convert from String value.
`void` `fromTimestamp(java.sql.Timestamp timestamp)` Convert from java.sql.Timestamp value.
`java.sql.Date` `toDate()` Convert value to a java.sql.Timestamp
`byte[]` `toIfx()` Convert value to Informix network format
`byte[]` `toIfxTuple()` Convert value to Informix tuple format
`java.lang.Object` `toObject()` Returns the equivalent Java object
`java.lang.String` `toString()` Convert value to a string based on GLS DATE environment variable precedence
`java.sql.Timestamp` `toTimestamp()` Convert value to a java.sql.Timestamp
`java.lang.String` `toUnloadString()` Convert to string format which is compatible with format generated by SQL unload command.
`java.sql.Date` `value()` accessor

### Methods inherited from class com.informix.jdbc.IfxObject

`clear, clearWarning, fromAsciiStream, fromAsciiStream, fromBinaryStream, fromBinaryStream, fromBlob, fromBoolean, fromBoolean, fromByte, fromByte, fromBytes, fromCharacterStream, fromCharacterStream, fromClob, fromDecimal, fromDecimal, fromDouble, fromDouble, fromFloat, fromFloat, fromIfx, fromIfx, fromIfx, fromIfx, fromInputStream, fromInputStream, fromInt, fromInt, fromIntervalDF, fromIntervalYM, fromLong, fromLong, fromNClob, fromObject, fromObject, fromObject, fromRowId, fromShort, fromShort, fromSQLXML, fromString, fromTime, get_used_in_update, getEncodedLength, getWarning, isNull, nullify, set_used_in_update, setConnection, setExtendedTypeName, setIfxType, setTypeMap, toAsciiStream, toBinaryStream, toBlob, toBoolean, toByte, toBytes, toCharacterStream, toClob, toDecimal, toDouble, toFloat, toIfxBSONObject, toInputStream, toInt, toInterval, toIntervalDF, toIntervalYM, toLong, toNClob, toObject, toRowId, toShort, toSQLXML, toTime, unnullify`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### IFX_DATE_NULL

    public static final int IFX_DATE_NULL

See Also:
  Constant Field Values

### Method Detail

#### value

    public java.sql.Date value()

accessor

#### toObject

    public java.lang.Object toObject()

Returns the equivalent Java object

Overrides:
  `toObject` in class `IfxObject`

#### toIfx

    public byte[] toIfx()

Convert value to Informix network format

Overrides:
  `toIfx` in class `IfxObject`
Returns:
  a byte array representation of this data type in Informix network format

#### toIfxTuple

    public byte[] toIfxTuple()

Convert value to Informix tuple format

Overrides:
  `toIfxTuple` in class `IfxObject`
Returns:
  a byte array representation of this data type in Informix tuple format

#### fromIfx

    public void fromIfx(byte[] b)

Set value of this data type to the given Informix network format

Overrides:
  `fromIfx` in class `IfxObject`

#### fromIfx

    public void fromIfx(byte[] b,
                        int offset,
                        int length)

Set value of this data type to the given Informix network format

Overrides:
  `fromIfx` in class `IfxObject`

#### toString

    public java.lang.String toString()

Convert value to a string based on GLS DATE environment variable precedence

Overrides:
  `toString` in class `IfxObject`
Returns:
  a string value representation of the date

#### fromString

    public void fromString(java.lang.String str)
                    throws java.sql.SQLException

Convert from String value.

Overrides:
  `fromString` in class `IfxObject`
Parameters:
  `str` - the String value
Throws:
  `java.sql.SQLException` - if the conversion failed

#### toTimestamp

    public java.sql.Timestamp toTimestamp()

Convert value to a java.sql.Timestamp

Overrides:
  `toTimestamp` in class `IfxObject`
Returns:
  a java.sql.Timestamp value representation of the date,

#### fromTimestamp

    public void fromTimestamp(java.sql.Timestamp timestamp)

Convert from java.sql.Timestamp value.

Overrides:
  `fromTimestamp` in class `IfxObject`
Parameters:
  `timestamp` - the java.sql.Timestamp value

#### toDate

    public java.sql.Date toDate()

Convert value to a java.sql.Timestamp

Overrides:
  `toDate` in class `IfxObject`
Returns:
  a java.sql.Timestamp value representation of the date,

#### fromDate

    public void fromDate(java.sql.Date date)

Overrides:
  `fromDate` in class `IfxObject`

#### equals

    public boolean equals(java.lang.Object other)

Find out whether two objects are equal.

Overrides:
  `equals` in class `IfxObject`
Parameters:
  `other` - the other object to compare with
Returns:
  true if the objects are equal

#### toUnloadString

    public java.lang.String toUnloadString()

Description copied from class: `IfxObject`
Convert to string format which is compatible with format generated by SQL unload command.

Overrides:
  `toUnloadString` in class `IfxObject`
Returns:
  the converted String object, or null on error