Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

GROUP BY month(date)

$
0
0
Guys,

I have an Expense entity with a trx_date colum of type DATE to record the date that I bought sth.
And then I wanna summary the total expenses by month, and I hit a blocker. I tried to create an view entity with a complex alias to represent the month, it's like:
<alias name="month" group-by="true">
<complex-alias operator="month()">
<complex-alias-field entity="Expense" field="trx_date">
</complex-alias>
</alias>

However, it did not work. Could anyone help me out here to get what I wanted? Thanks so much!

I am using the default database derby by the way. And Ofbiz version is 12.04.

Viewing all articles
Browse latest Browse all 5648

Trending Articles