Python snippet collection


Timestamp with milliseconds

import datetime
print "Timestamp %s" % datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3]

# Output: Timestamp 2017-05-07 21:32:42.379

 

Leave a comment

Your email address will not be published. Required fields are marked *