Package org.duckdb

# Class DuckDBTimestamp

java.lang.Object
org.duckdb.DuckDBTimestamp

Direct Known Subclasses:
  `DuckDBTime`, `DuckDBTimestampTZ`

public class DuckDBTimestamp extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`protected long`
`timeMicros`

## Constructor Summary

Constructors
Constructor
Description
`DuckDBTimestamp(long timeMicros)`
`DuckDBTimestamp(Timestamp sqlTimestamp)`
`DuckDBTimestamp(LocalDateTime localDateTime)`
`DuckDBTimestamp(OffsetDateTime offsetDateTime)`

## Method Summary

Modifier and Type
Method
Description
`static Timestamp`
`fromMicroInstant(long micros)`
`static Timestamp`
`fromMilliInstant(long millis)`
`static Timestamp`
`fromNanoInstant(long nanos)`
`static Timestamp`
`fromSecondInstant(long seconds)`
`static long`
`getMicroseconds(Timestamp sqlTimestamp)`
`long`
`getMicrosEpoch()`
`static long`
`localDateTime2Micros(LocalDateTime localDateTime)`
`LocalDateTime`
`toLocalDateTime()`
`static LocalDateTime`
`toLocalDateTime(long timeMicros)`
`OffsetDateTime`
`toOffsetDateTime()`
`static OffsetDateTime`
`toOffsetDateTime(long timeMicros)`
`static OffsetTime`
`toOffsetTime(long timeBits)`
`Timestamp`
`toSqlTimestamp()`
`static Timestamp`
`toSqlTimestamp(long timeMicros)`
`static Timestamp`
`toSqlTimestampNanos(long timeNanos)`
`String`
`toString()`
`static Object`
`valueOf(Object x)`

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

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

## Field Details

### timeMicros

protected long timeMicros

## Constructor Details

### DuckDBTimestamp

public DuckDBTimestamp(long timeMicros)

### DuckDBTimestamp

public DuckDBTimestamp(LocalDateTime localDateTime)

### DuckDBTimestamp

public DuckDBTimestamp(OffsetDateTime offsetDateTime)

### DuckDBTimestamp

public DuckDBTimestamp(Timestamp sqlTimestamp)

## Method Details

### toSqlTimestamp

public static Timestamp toSqlTimestamp(long timeMicros)

### toSqlTimestampNanos

public static Timestamp toSqlTimestampNanos(long timeNanos)

### toLocalDateTime

public static LocalDateTime toLocalDateTime(long timeMicros)

### toOffsetTime

public static OffsetTime toOffsetTime(long timeBits)

### toOffsetDateTime

public static OffsetDateTime toOffsetDateTime(long timeMicros)

### fromSecondInstant

public static Timestamp fromSecondInstant(long seconds)

### fromMilliInstant

public static Timestamp fromMilliInstant(long millis)

### fromMicroInstant

public static Timestamp fromMicroInstant(long micros)

### fromNanoInstant

public static Timestamp fromNanoInstant(long nanos)

### localDateTime2Micros

public static long localDateTime2Micros(LocalDateTime localDateTime)

### valueOf

public static Object valueOf(Object x)

### toSqlTimestamp

public Timestamp toSqlTimestamp()

### toLocalDateTime

public LocalDateTime toLocalDateTime()

### toOffsetDateTime

public OffsetDateTime toOffsetDateTime()

### getMicroseconds

public static long getMicroseconds(Timestamp sqlTimestamp)

### getMicrosEpoch

public long getMicrosEpoch()

### toString

public String toString()

Overrides:
  `toString` in class `Object`