Advertisement
Dido09

Next Date

Dec 2nd, 2021
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import datetime
  2. from datetime import timedelta
  3.  
  4. year = int(input('Enter year(yyyy): '))
  5. month = int(input('Enter month(mm): '))
  6. day = int(input('Enter day(dd): '))
  7.  
  8. my_date = datetime.datetime(year,month,day)
  9. print('Date is: ', my_date)
  10.  
  11. next_date = my_date + timedelta(days=1)
  12. print('Next date is: ', next_date)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement