Skip to main content

datetime

Function datetime 

Source
pub fn datetime<'a, V, E>(
    expr: E,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Timestamp, E::Nullable, E::Aggregate, E::Sources>
Expand description

A time value as YYYY-MM-DD HH:MM:SS (DATETIME), on SQLite.

The argument must be temporal. The result is the dialect’s timestamp type and keeps the argument’s nullability.

§Examples

assert_eq!(datetime(users.created_at).sql(), r#"DATETIME ("users"."created_at")"#);