Package org.duckdb

## Class DuckDBTimestamp

- java.lang.Object
- - org.duckdb.DuckDBTimestamp

Direct Known Subclasses:
  `DuckDBTimestampTZ`

    public class DuckDBTimestamp
    extends java.lang.Object

### Field Summary

Fields
`protected long` `timeMicros`

### Constructor Summary

Constructors
`DuckDBTimestamp​(long timeMicros)`
`DuckDBTimestamp​(java.sql.Timestamp sqlTimestamp)`
`DuckDBTimestamp​(java.time.LocalDateTime localDateTime)`
`DuckDBTimestamp​(java.time.OffsetDateTime offsetDateTime)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static java.sql.Timestamp` `fromMicroInstant​(long micros)`
`static java.sql.Timestamp` `fromMilliInstant​(long millis)`
`static java.sql.Timestamp` `fromNanoInstant​(long nanos)`
`static java.sql.Timestamp` `fromSecondInstant​(long seconds)`
`static long` `getMicroseconds​(java.sql.Timestamp sqlTimestamp)`
`long` `getMicrosEpoch()`
`static long` `localDateTime2Micros​(java.time.LocalDateTime localDateTime)`
`java.time.LocalDateTime` `toLocalDateTime()`
`static java.time.LocalDateTime` `toLocalDateTime​(long timeMicros)`
`java.time.OffsetDateTime` `toOffsetDateTime()`
`static java.time.OffsetDateTime` `toOffsetDateTime​(long timeMicros)`
`static java.time.OffsetTime` `toOffsetTime​(long timeBits)`
`java.sql.Timestamp` `toSqlTimestamp()`
`static java.sql.Timestamp` `toSqlTimestamp​(long timeMicros)`
`static java.sql.Timestamp` `toSqlTimestampNanos​(long timeNanos)`
`java.lang.String` `toString()`

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

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

### Field Detail

#### timeMicros

    protected long timeMicros

### Constructor Detail

#### DuckDBTimestamp

    public DuckDBTimestamp​(long timeMicros)

#### DuckDBTimestamp

    public DuckDBTimestamp​(java.time.LocalDateTime localDateTime)

#### DuckDBTimestamp

    public DuckDBTimestamp​(java.time.OffsetDateTime offsetDateTime)

#### DuckDBTimestamp

    public DuckDBTimestamp​(java.sql.Timestamp sqlTimestamp)

### Method Detail

#### toSqlTimestamp

    public static java.sql.Timestamp toSqlTimestamp​(long timeMicros)

#### toSqlTimestampNanos

    public static java.sql.Timestamp toSqlTimestampNanos​(long timeNanos)

#### toLocalDateTime

    public static java.time.LocalDateTime toLocalDateTime​(long timeMicros)

#### toOffsetTime

    public static java.time.OffsetTime toOffsetTime​(long timeBits)

#### toOffsetDateTime

    public static java.time.OffsetDateTime toOffsetDateTime​(long timeMicros)

#### fromSecondInstant

    public static java.sql.Timestamp fromSecondInstant​(long seconds)

#### fromMilliInstant

    public static java.sql.Timestamp fromMilliInstant​(long millis)

#### fromMicroInstant

    public static java.sql.Timestamp fromMicroInstant​(long micros)

#### fromNanoInstant

    public static java.sql.Timestamp fromNanoInstant​(long nanos)

#### localDateTime2Micros

    public static long localDateTime2Micros​(java.time.LocalDateTime localDateTime)

#### toSqlTimestamp

    public java.sql.Timestamp toSqlTimestamp()

#### toLocalDateTime

    public java.time.LocalDateTime toLocalDateTime()

#### toOffsetDateTime

    public java.time.OffsetDateTime toOffsetDateTime()

#### getMicroseconds

    public static long getMicroseconds​(java.sql.Timestamp sqlTimestamp)

#### getMicrosEpoch

    public long getMicrosEpoch()

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`