Published
- 1 min read
how to rewrite minute in datetime python
The solution for this is noted below
how to rewrite minute in datetime python
Solution
from datetime import datetime
date = datetime.strptime('26 Sep 2012', '%d %b %Y')
newdate = date.replace(hour=11, minute=59)
Try other methods by searching on the site. That is if this doesn’t work