How to get the current date and time in ISO format in Python

1 Answer

0 votes
import datetime

now = datetime.datetime.now()

print("Current date & time in ISO format: %s" % now.isoformat())

'''
run:

Current date & time in ISO format: 2015-06-23T19:19:29.972880

'''

 



answered Jun 23, 2015 by avibootz

Related questions

...