One Star

Sum date by Month

Hello,
I have the simplest (most complex) problem, I have a table with the invoice line items, I want to group those by customer and by month, no problem using tAggregateRow to do the sum, but I need to group my date by month not by day.
47734819 500066 311 2013-10-01 00:00:00.000 L888294 362 362 -55.42 -34.36
47734820 500066 311 2013-10-01 00:00:00.000 L888294 362 362 -27.60 -17.97
47734821 500066 311 2013-10-01 00:00:00.000 L888294 362 362 -64.40 -41.93
47734822 500066 311 2013-10-01 00:00:00.000 L888294 362 362 -7.88 -5.84
The output
47734820 500066 311 2013-10 362 362 -whateverthe sum -whateverthe sum
1 REPLY
Four Stars

Re: Sum date by Month

Hi oscarba,
- Can you convert date column to string and extract left 7 chars which is your yyyy-mm part of date.
- use this column in group by clause inside taggregaterow
Thanks
Vaibhav