How to get the data by date reference

how to get the data for that date with the date reference.
example: if the date is 28-04-2023
the data upto 28-04-2023 should get in the excel

@anjani_priya

Try this Linq:

dataTable.AsEnumerable()
    .Where(row => row.Field<DateTime>("Date") <= new DateTime(2023, 4, 28))
    .CopyToDataTable();

input input2 are inputs
output is the required and the salary should be sum and places beside the date, in input sheet and then convert that into crores
can you send the sample code
and if I change the date the respective date should be sum and should be print in the beside of date in input sheet
Book1.xlsx (78.4 KB)

Could you please explain clearly
by mentioning sheet names and all

there are three sheets ly cy aop
from LY,CY,LOP sheets, dept and month wise the salary should be sum and convert that into crores format and should fill the input sheet
how to do that

You mean salary column sum?

yes salary column should be sum by filtering the month as april and dept wise

Ok I will give a try and get back to you