Pastebin

Paste #2283: python get current date in iso format

< previous paste - next paste>

Pasted by tdn@syrah

Download View as text

>>> import time; time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime())
'2012-01-05T14:19:04'
>>> import time; time.strftime("%Y-%m-%d", time.gmtime())
'2012-01-05'
>>> 

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.