to_timestamp

Function to_timestamp 

Source
pub fn to_timestamp<'a, V, E>(
    expr: E,
) -> SQLExpr<'a, V, Timestamp, E::Nullable, Scalar>
where V: SQLParam + 'a, E: Expr<'a, V>,
Expand description

TO_TIMESTAMP - converts a Unix timestamp to a timestamp (PostgreSQL).

Returns Timestamp type. The input should be a numeric Unix timestamp.

§Example

use drizzle_core::expr::to_timestamp;

// SELECT TO_TIMESTAMP(users.created_unix)
let ts = to_timestamp(users.created_unix);