Skip to content

Latest commit

 

History

History

128_Work_with_datetimes_strptime_and_strftime

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Bite 128. Work with datetime's strptime and strftime

Description

In this Bite you get some more practice with datetime's useful strptime and strftime.

Complete the two functions: years_ago and convert_eu_to_us_date following the instructions in their docstrings.

This is the defintion and difference between the two:

  • strptime: parse (convert) string to datetime object.
  • strftime: create formatted string for given time/date/datetime object according to specified format.

Reference: 8.1.8. strftime() and strptime() Behavior. Good luck and keep calm and code in Python!