The easiest way is to use to_datetime:

Copydf['col'] = pd.to_datetime(df['col'])

It also offers a dayfirst argument for European times (but beware this isn't strict).

Here it is in action:

CopyIn [11]: pd.to_datetime(pd.Series(['05/23/2005']))
Out[11]:
0   2005-05-23 00:00:00
dtype: datetime64[ns]

You can pass a specific format:

CopyIn [12]: pd.to_datetime(pd.Series(['05/23/2005']), format="%m/%d/%Y")
Out[12]:
0   2005-05-23
dtype: datetime64[ns]
Answer from Andy Hayden on Stack Overflow
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.to_datetime.html
pandas.to_datetime — pandas 3.0.3 documentation
This function converts a scalar, array-like, Series or DataFrame/dict-like to a pandas datetime object. ... The object to convert to a datetime. If a DataFrame is provided, the method expects minimally the following columns: "year", "month", "day".
Discussions

Pandas convert Object to Datetime

The format in your error isn't the same as the line above, no space between `%A,` and `%b`. You sure there isn't a typo in your original format. This conversion isn't really going to work without some year information though.

x = ['Thursday, Mar 9', 'Wednesday, Mar 10']
pd.to_datetime(x, format='%A, %b %d')
   DatetimeIndex(['1900-03-09', '1900-03-10'], dtype='datetime64[ns]', freq=None)

More on reddit.com
🌐 r/learnpython
11
11
October 27, 2018
Can a pandas column be quickly converted to datetime if the column values contain letters?
This isn't a random letter in the date time. The format above meets ISO-8601 datetime specification. Providing the format string should allow Pandas to recognize it S a datetime variable. More on reddit.com
🌐 r/learnpython
4
7
November 11, 2020
Pandas question - Multiple Datetime columns to Dates
Does it work if you supply your own little function to use in .apply()? def dt2date(item): return pandas.to_datetime(item).dt.date More on reddit.com
🌐 r/learnpython
8
0
August 30, 2022
how to convert pandas columns of dates formatted like "2020-01-02 23:59:56.078191" to datetime object, then to ms epoch?
Try: df[‘UT’].astype(‘int64’) More on reddit.com
🌐 r/learnpython
5
3
April 15, 2022
🌐
GeeksforGeeks
geeksforgeeks.org › pandas › convert-the-column-type-from-string-to-datetime-format-in-pandas-dataframe
Convert Column Type from String to Datetime Format in Pandas Dataframe - GeeksforGeeks
Explanation: astype('datetime64[ns]') explicitly converts the “Date” column to datetime type. Change Data Type for one or more columns in Pandas Dataframe
Published   November 1, 2025
🌐
Favtutor
favtutor.com › articles › pandas-datetime-to-date
Convert Datetime to Date Column in Pandas (with code)
January 4, 2024 - The date() function is an in-built function that is used to convert the DateTime object into a date string. It is a simple and direct way to extract the date from a DateTime object.
🌐
Saturn Cloud
saturncloud.io › blog › converting-object-column-in-pandas-dataframe-to-datetime-a-data-scientists-guide
Converting Object Column in Pandas Dataframe to Datetime: A Comprehensive Guide | Saturn Cloud Blog
June 19, 2023 - In this article, we discussed why datetime format is necessary in pandas dataframes and how to convert object columns to datetime format using the pd.to_datetime() method. We also discussed some common challenges you may face during this process, ...
🌐
Spark By {Examples}
sparkbyexamples.com › home › pandas › pandas convert column to datetime
Pandas Convert Column To DateTime - Spark By {Examples}
June 26, 2025 - By using pandas to_datetime() & astype() functions you can convert column to DateTime format (from String and Object to DateTime). If your DataFrame
Find elsewhere
🌐
Vultr Docs
docs.vultr.com › python › third-party › pandas › to_datetime
Python Pandas to_datetime() - Convert to DateTime | Vultr Docs
December 9, 2024 - Setting dayfirst=True instructs pandas to interpret the first part of the date as the day, making the parsing unambiguous. Manage datasets with missing or faulty date entries effectively. Utilize the errors parameter to control the output upon encountering bad data. ... faulty_dates = ['2023-01-01', 'not a date', '2023-01-02'] datetime_objs = pd.to_datetime(faulty_dates, errors='coerce') print(datetime_objs) Explain Code
🌐
InfluxData
influxdata.com › home › pandas datetime: when and how to use it | influxdata
Pandas DateTime: When and How to Use It | InfluxData
December 6, 2023 - You can use Pandas DateTime by ... for display. To add DateTime to a Pandas DataFrame, you can create a new column and assign DateTime values to it using pd.to_datetime()....
🌐
GeeksforGeeks
geeksforgeeks.org › pandas › python-pandas-to_datetime
Pandas.to_datetime()-Python - GeeksforGeeks
June 24, 2025 - Explanation: pandas.to_datetime() expects dates in ISO format (YYYY-MM-DD), so we use 'format='%d/%m/%Y' to correctly parse day-first strings. It converts them into datetime objects and returns a DatetimeIndex holding datetime64 values.
🌐
Reddit
reddit.com › r/learnpython › pandas convert object to datetime
r/learnpython on Reddit: Pandas convert Object to Datetime
October 27, 2018 -

Good morning, I have been struggling with converting a pandas dataframe column from Object type to Datetime. The dates in the column are in the following format:

Thursday, Mar 9

I have tried several variations of the following code:

df['date']=pd.to_datetime(df['date'], format='%A, %b %d')

Every different variation of the above code returns an error saying

the errortime data 'Thursday, Mar 9' does not match format '%A,%b %d'

I feel like this should be simple but I'm banging my head against the wall trying to get over this. Thanks in advance for any help

🌐
Saturn Cloud
saturncloud.io › blog › convert-pandas-column-to-datetime-a-guide
Convert Pandas Column to DateTime A Guide | Saturn Cloud Blog
June 19, 2023 - The to_datetime() function takes a pandas column as input and returns a new column with datetime values. The function can also handle missing or invalid datetime values by setting them to NaT, which represents missing or invalid datetime data.
🌐
Medium
medium.com › @whyamit404 › converting-pandas-timestamp-to-datetime-0390728d0a2c
Converting Pandas Timestamp to Datetime | by whyamit404 | Medium
February 26, 2025 - pd.to_datetime(): This is your go-to function when you want to convert multiple timestamps at once—like a column in a DataFrame. It also handles many date formats and even lists of strings. You can think of it as a tool for batch conversion. import pandas as pd # A column of timestamps df = pd.DataFrame({'timestamps': ['2024-02-05', '2024-03-10', '2024-04-15']}) df['datetime'] = pd.to_datetime(df['timestamps']) print(df)
🌐
Seaborn Line Plots
marsja.se › home › programming › python › pandas convert column to datetime – object/string, integer, csv & excel
Pandas Convert Column to datetime - object/string, integer, CSV & Excel
November 20, 2023 - In the first section, we will create some practice data to work with. Following the creation of example data, we will explore converting an object (string) column to datetime using the to_datetime() method.
🌐
Spark By {Examples}
sparkbyexamples.com › home › pandas › pandas change string to date in dataframe
Pandas Change String to Date in DataFrame - Spark By {Examples}
June 26, 2025 - To convert a pandas DataFrame column from string to date type (datetime64) format, you can use the pandas.to_datetime() function or the DataFrame.astype()
🌐
Statology
statology.org › home › how to convert columns to datetime in pandas
How to Convert Columns to DateTime in Pandas
September 1, 2020 - #convert start_date to DateTime format df['start_date'] = pd.to_datetime(df['start_date']) #view DataFrame df event start_date end_date 0 A 2015-06-01 04:30:00 20150608 1 B 2016-02-01 05:45:00 20160209 2 C 2017-04-01 02:12:15 20170416 #view column date types df.dtypes event object start_date datetime64[ns] end_date object dtype: object · Of course, in the wild you’re likely to come across a variety of weird DateTime formats so you may have to actually use the format argument to tell Python exactly what DateTime format to use. In those cases, refer to this page for a complete list of % DateTime operators you can use to specify formats. How to Convert Datetime to Date in Pandas How to Convert Strings to Float in Pandas
🌐
TutorialsPoint
tutorialspoint.com › article › how-to-convert-datetime-to-date-in-pandas
How to Convert Datetime to Date in Pandas?
March 27, 2026 - Using the apply() function, we apply the extract_date() function to each element of the 'datetime' column. If you need the date as a string in a specific format, you can use strftime() with the dt accessor ? import pandas as pd # Create a sample ...
🌐
Reddit
reddit.com › r/learnpython › can a pandas column be quickly converted to datetime if the column values contain letters?
r/learnpython on Reddit: Can a pandas column be quickly converted to datetime if the column values contain letters?
November 11, 2020 -

I have a pandas column with ~100k rows that contains date strings. I'm attempting to convert the strings to datetime objects, but the strings currently contain a letter. Here's an example:

'2020-11-10T02:00:12.000'

Currently, I'm updating the column ('created_date') row by row to remove the letter, like so:

for date in df.created_date:     
    df.created_date.loc[date] = date[0:10] + ' ' + date[11:] 

This would allow me to convert the column values to datetime objects with the following code:

df['created_date'] = pd.to_datetime(                     
                     df['created_date'],                            
                     format='%Y-%m-%d %H:%M:%S.%f' 
                     )  

However, that first block of code is taking forever to run because there are so many rows. Is there a way to use pd.to_datetime, without that preprocessing step, to accomplish this task more quickly?

Thanks in advance for any suggestions!

🌐
W3Schools
w3schools.com › python › pandas › pandas_cleaning_wrong_format.asp
Pandas - Cleaning Data of Wrong Format
Let's try to convert all cells in the 'Date' column into dates. ... import pandas as pd df = pd.read_csv('data.csv') df['Date'] = pd.to_datetime(df['Date'], format='mixed') print(df.to_string()) Try it Yourself »
🌐
W3docs
w3docs.com › python
Convert Pandas Column to DateTime | W3Docs
import pandas as pd # Load the data df = pd.read_csv('data.csv') # Convert the 'Date' column to datetime df['Date'] = pd.to_datetime(df['Date']) # Print the data types print(df.dtypes)