Skip to main content

make_timestamp

Function make_timestamp 

Source
pub fn make_timestamp<'a, V, Y, Mo, D, H, Mi, S>(
    year: Y,
    month: Mo,
    day: D,
    hour: H,
    minute: Mi,
    second: S,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Timestamp, <<<<Y::Nullable as NullOr<Mo::Nullable>>::Output as NullOr<D::Nullable>>::Output as NullOr<H::Nullable>>::Output as NullOr<<Mi::Nullable as NullOr<S::Nullable>>::Output>>::Output, <<<<Y::Aggregate as AggOr<Mo::Aggregate>>::Output as AggOr<D::Aggregate>>::Output as AggOr<H::Aggregate>>::Output as AggOr<<Mi::Aggregate as AggOr<S::Aggregate>>::Output>>::Output>
Expand description

MAKE_TIMESTAMP - constructs a timestamp from components (PostgreSQL).

ยงExample

use drizzle_core::expr::make_timestamp;

// SELECT MAKE_TIMESTAMP(2024, 1, 15, 10, 30, 0.0)
let ts = make_timestamp(2024, 1, 15, 10, 30, 0.0);