python datetime

import datetime

nowtime = datetime.datetime.now()

nowtime.strftime("%Y-%m-%d %H:%M:%S.") + str(nowtime.microsecond)

转载于:https://www.cnblogs.com/zhaocundang/p/11082331.html

你可能感兴趣的:(python)