Run
import datetime #get current date and time x = datetime.datetime.now() #convert date and time to string dateTimeStr = str(x) #print the date and time string print(dateTimeStr) #print the type of dateTimeStr print(type(dateTimeStr))
Output