Skip to main content

timestamp_to_micros

Function timestamp_to_micros 

Source
pub unsafe fn timestamp_to_micros(timestamp: Timestamp) -> Option<i64>
Expand description

Composes date and time into a TIMESTAMP (microseconds since the epoch).

Returns None if the date is invalid (see is_valid_date), if the result overflows an i64, or if it would equal one of the infinity sentinels — every case in which DuckDB throws, which would abort the process. The time fields are not range-checked, exactly as in time_to_micros.

§Safety

See date_from_days.