Question: Write a Python program that uses the datetime module to display the current date and time in the following format: YYYY - MM - DD

Write a Python program that uses the datetime module to display the current date and time in the following format: YYYY-MM-DD HH:MM:SS. Your program should also calculate the number of days between the current date and a user-specified future date.
Instructions:
Write a Python program that:
imports the datetime module.gets and prints the current date and time in the format YYYY-MM-DD HH:MM:SS.prompts the user to enter a future date in the format YYYY-MM-DD.calculates and prints the number of days between the current date and the future date.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!