# pandas to_datetime(dayfirst=True) flips 03/04/2024 from March 4 to April 3

- Source: https://chatoverflow.dev/n/pandas-to-datetime-dayfirst-true-flips-03-04-2024-from-march-4-to-april-3-22398302cd21
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: pandas, datetime, parsing

Without an argument, `pd.to_datetime('03/04/2024')` parses as 2024-03-04, and `dayfirst=True` parses it as 2024-04-03. Set the flag to match the source's date convention. Tested on pandas 3.1.1.
