Package com.databricks.jdbc.api.impl.converters

## Class TimestampConverter

- java.lang.Object
- - com.databricks.jdbc.api.impl.converters.TimestampConverter

All Implemented Interfaces:
  `ObjectConverter`

    public class TimestampConverter
    extends Object
    implements ObjectConverter

### Field Summary

### Fields inherited from interface com.databricks.jdbc.api.impl.converters.ObjectConverter

`DEFAULT_TIMESTAMP_SCALE, POWERS_OF_TEN`

### Constructor Summary

Constructors
`TimestampConverter()`

### Method Summary

All Methods Instance Methods Concrete Methods
`BigInteger` `toBigInteger​(Object object)`
`Date` `toDate​(Object object)`
`long` `toLong​(Object object)`
`String` `toString​(Object object)`
`Time` `toTime​(Object object)`
`Timestamp` `toTimestamp​(Object object)` Converts an object to a `Timestamp`.

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

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

### Methods inherited from interface com.databricks.jdbc.api.impl.converters.ObjectConverter

`toAsciiStream, toBigDecimal, toBigDecimal, toBinaryStream, toBoolean, toByte, toByteArray, toChar, toCharacterStream, toDatabricksArray, toDatabricksMap, toDatabricksStruct, toDouble, toFloat, toInt, toLocalDate, toShort, toTimestamp, toUnicodeStream`

### Constructor Detail

#### TimestampConverter

    public TimestampConverter()

### Method Detail

#### toTime

    public Time toTime​(Object object)
                throws DatabricksSQLException

Specified by:
  `toTime` in interface `ObjectConverter`
Throws:
  `DatabricksSQLException`

#### toTimestamp

    public Timestamp toTimestamp​(Object object)
                          throws DatabricksSQLException

Converts an object to a `Timestamp`.

The method supports various input formats depending on the mode:

- timestamp_ntz:
  - Thrift Arrow: `timestamp yyyy-MM-dd HH:mm:ss.S`
  - Thrift Inline: `yyyy-MM-dd HH:mm:ss.S` (String)
  - Sea Inline: `yyyy-MM-dd'T'HH:mm:ss.SSS` (String)
  - Sea Arrow: `timestamp yyyy-MM-dd HH:mm:ss.S`
- Timestamp:
  - Thrift Arrow: `timestamp yyyy-MM-dd HH:mm:ss.S`
  - Thrift Inline: `yyyy-MM-dd HH:mm:ss` (String)
  - Sea Inline: `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` (String)
  - Sea Arrow: `yyyy-MM-dd HH:mm:ss.S`

Specified by:
  `toTimestamp` in interface `ObjectConverter`
Parameters:
  `object` - the object to convert
Returns:
  the converted `Timestamp`
Throws:
  `DatabricksSQLException` - if the conversion fails

#### toLong

    public long toLong​(Object object)
                throws DatabricksSQLException

Specified by:
  `toLong` in interface `ObjectConverter`
Throws:
  `DatabricksSQLException`

#### toBigInteger

    public BigInteger toBigInteger​(Object object)
                            throws DatabricksSQLException

Specified by:
  `toBigInteger` in interface `ObjectConverter`
Throws:
  `DatabricksSQLException`

#### toString

    public String toString​(Object object)
                    throws DatabricksSQLException

Specified by:
  `toString` in interface `ObjectConverter`
Throws:
  `DatabricksSQLException`

#### toDate

    public Date toDate​(Object object)
                throws DatabricksSQLException

Specified by:
  `toDate` in interface `ObjectConverter`
Throws:
  `DatabricksSQLException`