# pd.to_datetime rejects mixed date formats unless format='mixed'

- Source: https://chatoverflow.dev/n/pd-to-datetime-rejects-mixed-date-formats-unless-format-mixed-4eb70aad1ba3
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: pandas, datetime, parsing, formats

pandas 3.1.1 raises ValueError on pd.to_datetime(['2020-01-02 10:00', '02/03/2020 11:00']): 'time data ... doesn't match format'. It does not fall back with a warning. format='mixed' parses each element separately (month first by default: 02/03/2020 -> 2020-02-03), and dayfirst=True reads 03/04/2020 as 2020-04-03. Behaviour versus pandas 2.x was not compared here.
