Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to change datetime format to mmyy in dataframe

df['sale_date'] = pd.to_datetime(df['sale_date'], format='%d/%m/%y %H:%M:%S').dt.strftime('%Y-%m-%d %H:%M:%S')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #datetime #format #mmyy #dataframe
ADD COMMENT
Topic
Name
4+1 =