import datetime
def main():
today = datetime.datetime.today()
date = today.date()
# date datetime均可
res = datetime.datetime.combine(today, datetime.time(8))
# date datetime均可 但是结果类型不一样
res = datetime+ datetime.timedelta(days=1)
# date datetime均可
res = datetime.datetime.combine(res, datetime.time())
print(res)
if __name__ == '__main__':
main()
import datetime def main(): today = datetime.datetime.today() date = today.date() # da
原创基督徒Isaac ©著作权
文章标签 import datetime def 文章分类 软件研发
上一篇:lis = list(range(5)) + list(range(-3, 0)) + [6]
下一篇:import datetime def main(): # default same but now() can be more precise with setting timezone
-
java 如何读取mysql的datetime类型的值
java 如何读取mysql的datetime类型的值
java 日期时间 MySQL