Skip to main content

date_time_str_to_chrono_parse_from_str

Function date_time_str_to_chrono_parse_from_str 

Source
fn date_time_str_to_chrono_parse_from_str(input: &str) -> Result<String>
Expand description

Converts a date/time string to the appropriate chrono parse_from_str code snippet.

Attempts to parse the input with various chrono types and formats:

  • DateTime with offset
  • NaiveDateTime
  • NaiveDate
  • NaiveTime

ยงErrors

Returns an error if the input cannot be parsed with any supported format.