I am Trying to get the current date This is my code
import datetime
x = datetime.datetime.now()
print(x)
But I need Only Date not date and Time both
I am Trying to get the current date This is my code
import datetime
x = datetime.datetime.now()
print(x)
But I need Only Date not date and Time both
import datetime
x = datetime.datetime.now().strftime('%Y-%m-%d')
print(x)