On January 21th at 14:15 UTC , progression through exercises will be unavailable for 10 minutes due to a planned maintenance break.
Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
12. Exercise 1


In this part, we learned about dates:

  • How to create them from a string with functions such as ymd_hms() or dmy_hms().
  • How to extract parts from a date with functions such as month() or wday().
  • How to calculate the difference between two dates with the interval() and as.period() functions.

We will continue to use the same data set that we examined in the previous part when we worked with Strings. We can see that the reservations' start date is in a good format. But the end date, well... that needs cleaning.


Change the format of the end_date column to month/days/year (mm/dd/yyyy). Don't forget to import the lubridate package.

Stuck? Here's a hint!

Use the mdy() function.