Function age
Source pub fn age<'a, V, E1, E2>(
timestamp1: E1,
timestamp2: E2,
) -> SQLExpr<'a, V, Text, <E1::Nullable as NullOr<E2::Nullable>>::Output, Scalar>
Expand description
AGE - calculates the interval between two timestamps (PostgreSQL).
Returns Text (interval representation). The result is nullable if either input is nullable.
§Example
ⓘuse drizzle_core::expr::age;
let user_age = age(now(), users.created_at);