How to filter date format with timestamp

i have date format as dd-mm-yyyy hh:mm:ss within excel sheet.how can i filter data table by dynamically passing start date(dd-mm-yyyy) and end date(dd-mm-yyyy).i tried filter datatable but it is throwing error…Kindly help

Thanks

Hi @Samsanditha
Use Datatable.Select(“[StartDate]=Cdate(row(“StartDate”).ToString(“dd-mm-yyyy”)’ and [endDate]=Cdate(row(“EndDate”).ToString(“dd-mm-yyyy”)‘’”).CopytoDatatable

Try this based on Assign New Dt

Thanks
Ashwin S

Thank you…i will try this method and let u know

@Samsanditha

dtTest is datatable “StartDate” is your start data col name follow same as “end date”

dtTest.AsEnumerable().Where(function (x) Cdate(Cdate(x(“StartDate”)).ToString(“dd/MM/yyyy”))>=Cdate(YourstartdateStringVariable) and Cdate(Cdate(x(“EndDate”)).ToString(“dd/MM/yyyy”))<=Cdate(YourenddateStringVariable)).CopyToDataTable

Thank you…i will try this one

i already have datatable with certain values in it Screenshot%20(307)…i am not able figure out your method…if you could elaborate…

Thanks