Add one day to DateTime Python

This Python DateTime tutorial will teach you how to add one day to DateTime. You can add one day to DateTime using the following code:

# Import the datetime module
import datetime

# Get the current date and time
date_time = datetime.datetime.now()

# Add 1 day to the date and time
date_time = date_time + datetime.timedelta(days=1)

# Display the date and time
print("Date and time after 1 day:", str(date_time))

Free learning resources: AiHintsCodeAllow

Leave a Comment

Your email address will not be published.