SyntaxFix
Write A Post
Hire A Developer
Questions
You can use datetime.date.today() and convert the resulting datetime.date object to a string:
datetime.date.today()
datetime.date
from datetime import date today = str(date.today()) print(today) # '2017-12-26'