cancel
Showing results for 
Search instead for 
Did you mean: 

Grouping data based on the Date&Time

Former Member
0 Kudos

Hello Experts,

We are getting the data from two different databases into XML document with fields (DATE_TIME, COUNT) and we need to group the data based on the DATE_TIME. How can we do this?

For example: we have the data in XML file

2009-08-31T00:00:00 100

2009-09-30T00:00:00 200

2009-08-31T00:00:00 300

After grouping the data we want the data like this:

2009-08-31T00:00:00 400

2009-09-30T00:00:00 200

Thanks

Mohan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Forget the aggregator and other actions - you're missing the easy way. Use the Crosstab action.

Answers (1)

Answers (1)

Former Member
0 Kudos

Mohan,

Use a conditional action block and put datecompare( datetime1 , datetime2 ) function available. If the dates are matching then add the count values. Here datetime1 is current repetaer datetime and datetime2 is previous repeater datetime. You have to store prvious repeater datetime in a local property.

-Suresh

Former Member
0 Kudos

Hi Suresh,

Thanks for the reply. MII doesn't have any action block to do this instead of writing our own logic in BLS.

Thanks

Mohan

Former Member
0 Kudos

Mohan,

You can use Aggregator & Calculated Column action blocks but there you still need to write xpath and expression respectively.

-Suresh