Does not filter correctly by date

Hello.
I have a table in Google Drive and I want to filter by a field called Limit, which is a date field (dd/mm/yyyy). Using “Filter data table” doesn’t filter correctly. Setting it as shown in the image gives me zero results, and it should give me data. Any ideas?

Limite < Today.now.tostring(“dd/MM/yyyy”)

Hi @Aguirre

Can you share the input excel.

Regards

I mean, you can’t compare a String with a “<” operator. I’d suggest you use a LINQ instead.

‘Limit’ field could be of type string, because of this date filter is not working.
You can use assign activity with below filter

(From x in DTCalc.AsEnumerable
Where Today > Datetime.ParseExact(x.Item("Limite").ToString, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture)
).CopyToDataTable
1 Like

read range from google drive, selecting the spreadsheet and the interval.

Validation error BC30311: The value of type ‘DataTable’ cannot be converted to ‘String’. The selected value is incompatible with the property type.

You should assign output of this query to DataTable variable.