Import from datetime module instead code example
Example: import datetime
from datetime import datetime
date = datetime.now()
print(date)
# Prints in the format year, month, day, hour, minute, second, and microsecond
from datetime import datetime
date = datetime.now()
print(date)
# Prints in the format year, month, day, hour, minute, second, and microsecond