How to get the data table data based on filter month wise

Hi
I have a Data table with Date column, using Date column i need to segregate the data monthly and quarterly wise.
I have tried with Filter Data table activity.But I have used fixed date condition.So, i’m getting only one month data only…i want to get all months datasets one by one
Any suggestions to how to do this one??

1 Like

Hey @sindhura506,

You can query the DataTable by means of the date field.

DT.AsEnumerable.Where(function(row) Date.Parse(row("date").ToString).Month = 2)

Something like above. Hope this helps.

Thanks :slight_smile:

Actually we need to separate each month data by adding new 3 empty rows in between them.So, i need to identify each month data starting and ending position

1 Like

Hey @sindhura506,

Here is the core logic for you. You can re-modify or update as per your need.

DTMonthSep.zip (2.9 KB)

This will help you add empty row at the end of each month.

Thanks :slight_smile:

Getting error message while using TestDT.Rows.IndexOf(TestDT.AsEnumerable.Last(function(row) CDate(row(“Date”).ToString).Month = item)) assign acitivity

1 Like

Kindly check in you imports(next to arguments panel) - whether do you have this System.Data.DataSetExtensions

Else please add

Thanks :slight_smile:

can’t able to add System.Data.DataSetExtensions to imports

1 Like

Could you please try this