Python/Datetime: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
Line 14: Line 14:
! TODO || Code
! TODO || Code
|-
|-
| ISO 8601 ||
| To ISO string ||
<source lang="python3">
<source lang="python3">
</source>
</source>


|-
|-
| RFC 2322 ||
| To RFC string ||
<source lang="python3">
<source lang="python3">
</source>
</source>

Revision as of 08:02, 18 May 2018

Parsing

TODO Code
Parse RFC Time
import datetime
datetime.datetime.strptime(s, '%a, %d %b %Y %H:%M:%S GMT')

Formatting

TODO Code
To ISO string
To RFC string

Manipulate