return the timestamp after some days in python

Solutions on MaxInterview for return the timestamp after some days in python by the best coders in the world

showing results for - "return the timestamp after some days in python"
Brittany
24 Aug 2019
1from datetime import date, timedelta
2
3current_date = date.today().isoformat()   
4days_before = (date.today()-timedelta(days=30)).isoformat()
5days_after = (date.today()+timedelta(days=30)).isoformat()  
6
7print("\nCurrent Date: ",current_date)
8print("30 days before current date: ",days_before)
9print("30 days after current date : ",days_after)
10
11