Write a Python program to Convert following datetime instance into string format


Topic: Write a Python program to Convert following datetime instance into string format

Solution

from datetime import datetime
given_date = datetime(2020, 2, 25)
string_date = given_date.strftime("%Y-%m-%d %H:%M:%S")
print(string_date)



List all Python Programs