Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Python3: RFC date 15 days from current date

Options
  • 15-12-2021 8:10pm
    #1
    Registered Users Posts: 5,575 ✭✭✭veryangryman


    I can get the current date in the required format with

    time_rule_locked = datetime.datetime.utcnow().isoformat("T") + "Z"
    


    But i want to print 15 days from current. I know theres timedelta but cant spot the right place to put it. My attempt below gives a string problem

    time_rule_locked = datetime.datetime.utcnow().isoformat("T").timedelta(days=15) + "Z"
    




Comments

Advertisement