SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the date.timetuple() method and unpack operator *.
date.timetuple()
*
args = d.timetuple()[:6] datetime.datetime(*args)