Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Last 28 Days in Python - For Reporting
# Define the report date range: last 28 days including today
start=datetime.today().date().isoformat().replace("-", "")
end=datetime.now() + timedelta(days= - 28)
end= end.date().isoformat().replace("-","")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment