pub fn age<'a, V, E1, E2>(
timestamp1: E1,
timestamp2: E2,
) -> SQLExpr<'a, V, Interval, <E1::Nullable as NullOr<E2::Nullable>>::Output, <E1::Aggregate as AggOr<E2::Aggregate>>::Output>Expand description
AGE - calculates the interval between two timestamps (PostgreSQL).
Returns PostgreSQL INTERVAL. The result is nullable if either input is nullable.
ยงExample
use drizzle_core::expr::age;
// SELECT AGE(NOW(), users.created_at)
let user_age = age(now(), users.created_at);