Anyone has some suggestions on how to convert below "1/1/08" to "2008-01-01"?
I Have tried datetime and strptime
datetime.strptime(str(Date_data['CALENDAR_DATE']), '%m/%d/%y').strftime('%m/%d/%Y')
Error says not match. I guess I need to remove \n1. However it is a dynamic number.How to do that ?
ValueError: time data '0 1/1/08\n1 1/2/08\n2 1/3/08\n3 1/4/08\n4 1/5/08\n ... \n5866 1/23/24\n5867 1/24/24\n5868 1/25/24\n5869 1/26/24\n5870 1/27/24\nName: CALENDAR_DATE, Length: 5871, dtype: object' does not match format '%m/%d/%y'
sample data:
CALENDAR_DATe: 1/1/08, 1/2/08