Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- back10 = datetime.datetime.now() - datetime.timedelta(days=10) # 10 days ago
- now = datetime.datetime.now() # now
- # math
- if back10 > now :
- print '%s is greater than %s' % (back10, now)
- if back10 < now :
- print '%s is less than %s' % (back10, now)
- #"10 days ago is less than now"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement