datetime get the time a week ago code example
Example 1: how to get date in numbers using python
from datetime import datetime
shortDate = datetime.today().strftime('%Y-%m-%d')
Example 2: python datetime get date one week from today
>>> import datetime
>>> datetime.datetime.now() + datetime.timedelta(days=7)