大师的学徒

关注

python打印当前时间

大师的学徒

关注

阅读 25

2023-09-06

import datetime
time_stamp = datetime.datetime.now()
print "time_stamp       " + time_stamp.strftime('%Y.%m.%d-%H:%M:%S')   #strftime可以自定义时间的输出格式,输出为time_stamp       2017.02.19-14:03:20

相关推荐

前程有光

java 打印当前时间

前程有光 65 0 0

mm_tang

Python中打印日志,文件,行号,当前时间

mm_tang 76 0 0

五殳师兄

java 打印当前时间的时间戳

五殳师兄 39 0 0

晴儿成长记

python 扩展print打印文件路径和当前时间信息

晴儿成长记 104 0 0

仲秋花似锦

python 打印时间

仲秋花似锦 59 0 0

ZSACH

[日常折腾]多种编程语言打印当前系统时间

ZSACH 39 0 0

凶猛的小白兔

Python 当前时间+1天

凶猛的小白兔 77 0 0

大南瓜鸭

Python之输出当前时间

大南瓜鸭 54 0 0

年夜雪

【python】获取当前时间戳

年夜雪 139 0 0

young_d807

python打印时间 纳秒

young_d807 27 0 0

精彩评论(0)

0 0 举报