I'm thinking of a date in this format:
time.strftime("%d/%m/%Y") // 00/00/0000
I want to subtract two weeks from that date, but I do not know how to do it.
I'm thinking of a date in this format:
time.strftime("%d/%m/%Y") // 00/00/0000
I want to subtract two weeks from that date, but I do not know how to do it.
You can use timedelta
and pass as parameter to amount of days you want to replace from a date.
from datetime import datetime, timedelta
hoje = datetime.today() - timedelta(days=14)