pub fn to_date<'a, V, E, F>(
expr: E,
format: F,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Date, E::Nullable, <E::Aggregate as AggOr<F::Aggregate>>::Output>Expand description
TO_DATE - parses a date from text using a format pattern (PostgreSQL).
Returns Date type, preserves nullability of the input expression.
ยงExample
use drizzle_core::expr::to_date;
// SELECT TO_DATE('2024-01-15', 'YYYY-MM-DD')
let d = to_date("2024-01-15", "YYYY-MM-DD");