Skip to the content.
Format Time String
Recipes for Python. Hands-on code examples, snippets and guides for daily work.
View on GitHub
Format Time String
Recipes
import
time
>>>
time
.
strftime
(
'%Y-%m-%d %H:%M:%S'
,
time
.
localtime
())
'YYYY-MM-DD hh:mm:ss'
References
Python -
time
module