Start time is in format datetime with :
YYYY-MM-DDTHH:MM:SS.SSSZ (e.g., 2004-08-04T19:09:02.768Z)
My code
starttime = item['ListingDetails']['StartTime']
present_date = datetime.now() - timedelta(days=2)
startdate = datetime.strptime(starttime, 'WhichFormat')
if startdate.date() < present_date.date():
print('Relisting item :', str(itemid), starttime)
Is throwing the exception because i dont know which was the real format.
Goal is to see if start time is 2 days ago. I.E If item was relisted 2 days ago + then relist it now