how to get datetime today + 30 days in python

You can use the datetime module in Python to get today's date and add 30 days to it. Here's an example:

main.py
from datetime import datetime, timedelta

today = datetime.today()
future_date = today + timedelta(days=30)

print("Today:", today)
print("Future date:", future_date)
167 chars
8 lines

This code snippet will print today's date and the date after 30 days from today.

related categories

gistlibby LogSnag