o.create_order.strftime("%d %B %Y")
回报没事的时候
time.strftime("%d %B %Y")
返回的日期 “2013年2月10日” ???
o.create_order是根据postgresql的时间戳。 它包含“30/11/2012 09:38:34”在openErp销售订单上看到 - 其他信息选项卡。 当查询数据库时,它被存储为“2012-11-30 08:38:34.272”。 所以我期望看到“2012年11月30日”,但没有取而代之。 我误解了语法?
我测试了这个蟒蛇3.3:
>>> d1=datetime.datetime.today()
>>> print(d1.strftime("%d %B %Y"))
10 february 2013
我如何得到它的OpenOffice的作家的工作?
顺便说一句,如何获得“二月”而不是“二月”?
为什么ORM为date/datetime字段返回这样的字符串?似乎有点不受欢迎。 – 2014-12-10 13:45:48