from datetime import datetime
date_str = "2022-01-01"
parsed_date = datetime.strptime(date_str, "%Y-%m-%d")
formatted_date = parsed_date.strftime("%B %d, %Y")
print(f"Parsed Date: {parsed_date}\nFormatted Date: {formatted_date}")Output:
Parsed Date: 2022-01-01 00:00:00
Formatted Date: January 01, 2022


