diff --git a/README.md b/README.md index 2b643f4..c4fe840 100644 --- a/README.md +++ b/README.md @@ -372,12 +372,12 @@ shuffle() Datetime -------- ```python -import datetime -now = datetime.datetime.now() +from datetime import datetime, strptime +now = datetime.now() now.month # 3 now.strftime('%Y%m%d') # '20180315' now.strftime('%Y%m%d%H%M%S') # '20180315002834' - = datetime.strptime('2015-05-12 00:39', '%Y-%m-%d %H:%M') + = strptime('2015-05-12 00:39', '%Y-%m-%d %H:%M') ```