Browse Source

Random

pull/3/head
Jure Šorn 5 years ago
parent
commit
e987a4efbd
1 changed files with 3 additions and 3 deletions
  1. 6
      README.md

6
README.md

@ -372,12 +372,12 @@ shuffle(<list>)
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> = datetime.strptime('2015-05-12 00:39', '%Y-%m-%d %H:%M')
<datetime> = strptime('2015-05-12 00:39', '%Y-%m-%d %H:%M')
```

Loading…
Cancel
Save