Skip to main content

parse_date

Function parse_date 

Source
pub fn parse_date(text: &str) -> Option<NaiveDate>
Expand description

Parse a YYYY-MM-DD date with a year of four or more digits and PostgreSQL’s trailing BC.

let d = sql_values::parse_date("2024-01-02").unwrap();
assert_eq!(d.to_string(), "2024-01-02");