Select Method

Hi Folks,

I’m stuck with dynamic dates, please help me with this issues.

Step 1: From website “Query Date” format is “yyyy-mm-dd hh:mm”. I want current date in
“yyyy-mm-dd” and this should be dynamic selector.
Step 2: From website “Date Range” format is “yyyy-mm-dd” - “yyyy-mm-dd”, this is month to date and this also should be dynamic selector.

For reference I have attached screenshot

ExtractDataTable.Select(“[Report Name]=‘SJIT_Orders_Report’ AND [Query Date] Like '%”+DateTime.Now.ToString(“dd-MMM,”)+“%’ AND [Date Range] = ‘2023-10-01 - 2023-10-25’”).CopyToDataTable

Maybe shifting to a LINQ will let you allow to get more control on the filter expression. Could this be an option for you?

Keep in mind:
grafik

Maybe more a part date like this was targeted:
grafik

Hi @ppr

I have changed to [Query Date] Like ‘%“+DateTime.Now.ToString(“yyyy-MM-dd”)+”%’, but still having an issue

Yes we would assume this as well

here we would examine more the details of the extracted DataTable

However

it was not answered so far

Hi @ppr

I have done for “Query Date” now I to do for “Date Range”

[Date Range] = ‘2023-10-01 - 2023-10-26’.

I want dynamic date range, is there any other options to resolve this