码迷,mamicode.com
首页 > 其他好文 > 详细

datetime处理日期和时间

时间:2017-09-30 13:24:56      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:bsp   style   print   es2017   rom   div   日期   datetime   span   

from datetime import datetime
now=datetime(2017,9,28)
print(now.strftime(今天是%Y年%m月%d日))
print(now.strftime(今天是这周的第%w天))
print(now.strftime(今天是今年的第%j天))
print(now.strftime(今周是今年的第%W周))
print(now.strftime(今天是当月的第%d天))

技术分享

 

datetime处理日期和时间

标签:bsp   style   print   es2017   rom   div   日期   datetime   span   

原文地址:http://www.cnblogs.com/wgd0069/p/7614366.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!