Dead date and reschedule



  • I've got the date. 03.11.21 - 3 November 21 years ago, I have to take another date from this date. 18.3.19 - March 18, 19, and translate the results on days



  • Very simple.

    from datetime import date
    today = date.today()
    any_day = date(2019,3,18)
    print((today - any_day).days)
    

    961

    https://docs.python.org/3/library/datetime.html

    any_day = date(2021,10,9)
    print((today - any_day).days)

    25


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2