code
>>> >>> import datetime >>> i = datetime.datetime.now() >>> t="{}{}{}{}{}{}-{}".format(i.year,i.month,i.day,i.hour,i.minute,i.second,i.microsecond) >>> t '20201223222345-912710' >>>
2024-04-09 10:36:40
code
>>> >>> import datetime >>> i = datetime.datetime.now() >>> t="{}{}{}{}{}{}-{}".format(i.year,i.month,i.day,i.hour,i.minute,i.second,i.microsecond) >>> t '20201223222345-912710' >>>
下一篇:MySQL使用时间作为判断条件