I have a variable which is of type string in timestamp format Fri, 19 Mar 2021 06:15:55 +0000
Used https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior to format but it throws ValueError: time data 'Fri, 19 Mar 2021 06:15:55 +0000' does not match format '%a, %d %b %Y %H:%M:%S.%f'
my code for changing format
pub_date=datetime.datetime.strptime(i.published, '%a, %d %b %Y %H:%M:%S.%f').strftime('%Y-%m-%d %H:%M:%S')