How to get the data with the date reference

How to get the data which has month and getting the data up to the mentioned month. How to get that.


Try this Linq

filteredData = data.AsEnumerable()
.Where(row => row.Field(“Date”).Month == targetMonth)


i want in this method
can you please tell the solution for this


allData.Where(Function(item) item.Date.Month <= monthNumber).ToList()

can you send the sample code

list of dates are there in the datatable(dt1) in that we need specified dates based on month

dt1.AsEnumerable().Where(Function(x) cint(DateTime.ParseExact(x(0).ToString(),“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MM”)) >= 4).CopyToDataTable()

Book1.xlsx (77.0 KB)
input sheet is the date reference
from input sheet mentioned date, the date of salary of the april month of IT dept should be sum at the input sheet beside of date.
how to do?

Use the code in assign activity.

Dt is the Variable type.

Dt = dt.AsEnumerable().Where(row.Field(“Date”).Month = targetMonth).CopyToDataTable()

can you send the sample code

Hi @anjani_priya

For your scenario i have taken a sample and changed the salary amount to 10 for April month for all it deportment’s and if i add the all April month the out put as 80 you can see the output

try this Xaml and let me know

Xaml : - (2.2 KB)

output : -


Note :- for your process you can keep the salary amount as same just an easy purpose i have changed the 10 for April month

If I mention the current month and I want data of previous months also like dynamically. For example, if I mention 30-04-2023 then jan,feb,march data should also be there.(the previous months present in the sheet)
can you tell how to solve