如何在 Trac 中创建在特定日期关闭的票证报告
我希望创建一个报告,列出在特定时间段内关闭的所有票证。
伪代码就像
SELECT * FROM tickets
WHERE closed AND date_closed = 'january 2009'
我无法解析的部分是date_close = 'january 2009'
。
有没有办法在 Trac 中做到这一点?
我对特定的 SQL 语法不感兴趣,我可以自己编写时间限制。 我不确定 Trac 的数据库结构。
I wish to create a report that would list all the tickets that were closed in a certain period of time.
The pseudo-code would be like
SELECT * FROM tickets
WHERE closed AND date_closed = 'january 2009'
The part I am unable to resolve is date_closed = 'january 2009'
.
Is there a way to do it in Trac?
I am not interested in particular SQL syntax, I can write the time constrictions myself. What I am not certain about is Trac's db structure.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您想要特定月份:
其中
date('2009-01-01','start of Month')
是日期给定月份的第一天,date('2009 -01-01','月初','+1 月','-1 天')
是该月的最后一天。If you want a specific month:
Where
date('2009-01-01','start of month')
is the first day of the month given by date, anddate('2009-01-01','start of month','+1 month','-1 day')
is the last day of the month.如果您还知道年份,则最好使用 vartec 建议的表达式,而不是 strftime:
If you also know the year, instead of strftime you’d better use an expression like vartec’s suggested:
另外,关于表结构,这里是:
Also, regarding the table structure, here you go: