5
I’m thinking a date in this format:
time.strftime("%d/%m/%Y") // 00/00/0000
I want to subtract two weeks from that date, but I don’t know how to do it.
5
I’m thinking a date in this format:
time.strftime("%d/%m/%Y") // 00/00/0000
I want to subtract two weeks from that date, but I don’t know how to do it.
8
You can use the timedelta
and pass as a parameter the number of days you want to replace from a date.
from datetime import datetime, timedelta
hoje = datetime.today() - timedelta(days=14)
Browser other questions tagged python python-3.x python-2.7
You are not signed in. Login or sign up in order to post.