[][src]Function diesel::dsl::date

pub fn date<expr>(
    expr: expr
) -> date<<expr as AsExpression<Timestamp>>::Expression> where
    expr: AsExpression<Timestamp>, 

Represents the SQL DATE function. The argument should be a Timestamp expression, and the return value will be an expression of type Date.

Examples

This example is not tested
let today: chrono::NaiveDate = diesel::select(date(now)).first(&connection).unwrap();