Ricordanza
12/12/2016 - 12:27 PM

Get up to milliseconds with python

Get up to milliseconds with python

from datetime import datetime as dt

now = dt.now()
print now.strftime("%Y%m%d%H%M%S.") + "%04d" % (now.microsecond // 1000)