struct DuckDB::Timestamp

Defined in:

duckdb/timestamp.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(date : DuckDB::Date, time_of_day : DuckDB::TimeOfDay) #

[View source]
def self.new(time : Time) #

Initializes a timestamp with a Time instance in UTC.

It raises ArgumentError if time is not in UTC.

NOTE Beware the loss of precision in the fractional part (nanoseconds to microseconds)


[View source]
def self.new(string : String) #

[View source]
def self.new(microseconds : Int64) #

Initialize with microseconds since Time::UNIX_EPOCH


[View source]

Instance Method Detail

def ==(other : self) : Bool #

[View source]
def date : Date #

[View source]
def day(*args, **options) #

[View source]
def day(*args, **options, &) #

[View source]
def hour(*args, **options) #

[View source]
def hour(*args, **options, &) #

[View source]
def microsecond(*args, **options) #

[View source]
def microsecond(*args, **options, &) #

[View source]
def millisecond(*args, **options) #

[View source]
def millisecond(*args, **options, &) #

[View source]
def minute(*args, **options) #

[View source]
def minute(*args, **options, &) #

[View source]
def month(*args, **options) #

[View source]
def month(*args, **options, &) #

[View source]
def second(*args, **options) #

[View source]
def second(*args, **options, &) #

[View source]
def submillisecond?(*args, **options) #

[View source]
def submillisecond?(*args, **options, &) #

[View source]
def subsecond?(*args, **options) #

[View source]
def subsecond?(*args, **options, &) #

[View source]
def time_of_day : TimeOfDay #

[View source]
def to_s #

Returns the timestamp with an ISO 8601 format.


[View source]
def to_time #

Returns a Time instance with the respective timestamp in UTC.


[View source]
def year(*args, **options) #

[View source]
def year(*args, **options, &) #

[View source]