Python/Datetime: Difference between revisions
< Python
Jump to navigation
Jump to search
(→Parse) |
(→Parse) |
||
| Line 3: | Line 3: | ||
! TODO || Code | ! TODO || Code | ||
|- | |- | ||
| Parse RFC Time || <source lang="python3">datetime.strptime(s, '%a, %d %b %Y %H:%M:%S GMT')</source> | | Parse RFC Time || | ||
<source lang="python3"> | |||
import datetime | |||
datetime.datetime.strptime(s, '%a, %d %b %Y %H:%M:%S GMT') | |||
</source> | |||
|} | |} | ||
Revision as of 08:00, 18 May 2018
Parse
| TODO | Code |
|---|---|
| Parse RFC Time |
import datetime
datetime.datetime.strptime(s, '%a, %d %b %Y %H:%M:%S GMT')
|