Posts by Gilson Filho • 71 points
1 post
-
7
votes3
answers15165
viewsA: How to subtract two dates using Python?
There’s another way too: # -*- coding: utf-8 -*- from datetime import datetime def diff_days(date1, date2): d1 = datetime.strptime(date1, "%d-%m-%Y") d2 = datetime.strptime(date2, "%d-%m-%Y") return…