Extracting date from a string in Python,"date = datetime.strptime(match.group(), '%Y-%m-%d').date()"