Course Content
Organizing Date and Time Data for Analysis and Applications
Organizing Date and Time Data for Analysis and Applications
Operations with Dates
Now that you have understood what datetime objects are and how you can transform them, we can introduce the timedelta() function. timedelta() allows you to alter your dates by adding a delta to your dates (days, months, ecc..). We will also show how easy it is to find the difference between two dates.
Task
Swipe to start coding
- Import the
datetimelibrary with thetimedeltamodule; - Find the difference between two dates;
- Add 30 days to the
date1variable.
Solution
Mark tasks as Completed
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 5
AVAILABLE TO ULTIMATE ONLY