pub fn to_timestamp<'a, V, E>(
expr: E,
) -> SQLExpr<'a, V, Timestamptz, E::Nullable, E::Aggregate>where
V: SQLParam + 'a,
V::DialectMarker: PostgresDateTimeSupport,
E: Expr<'a, V>,
E::SQLType: Numeric,Expand description
TO_TIMESTAMP - converts a Unix timestamp to a timestamp (PostgreSQL).
Returns TimestampTz 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);