Filter Date on CSV Data and write to excel

Hi all !

I have 3 filters to do on csv data and then write the filtered data to an excel file.I’m only blocking on the filter for a date field where I want to filter on all dates <= to the current date.

here is my workflow


When I run the flow as it is I get an error message. On the other hand, if I remove the date filter, the processing goes to the end. Thanks for your help :pray:

I specify that I work on studioX.

@bloog

Please remove .Tostring…if you wnat to filter date it should be of date type…

Or enclose it in Cdate(Today.ToString("dd/MM/yyyy"))
again

If the culture format for your laptop is MM/dd/yyy then use date.parseexact instead of cdate

Date.ParseExact(Today.ToString("dd/MM/yyyy"),"dd/MM/yyyy",System.Globalization.CultureInfo.InvariantCulture)

Cheers

Hi Anil_G
I tried your method but it didn’t work :disappointed_relieved:. I get the same error message as before:

image

Thank you in advance for your help…

Hi,

Can you try to use UseEscelFile instead of ReadCSV and read data using ReadRange?
(Sheet name will be filename without .csv)

Then we can use just Today as value for "DATE FIN… " column in FilterDataTable activity.

Regards,

Hi Yoichi,

I did what you told me (I think) and I get this error message as a result:

image

it may be due to the fact that the columns are not separated (semicolon) in the input range (I see that during processing)… If this is the case how could I solve the problem please.

Thanks

Hi,

Is your csv semicolon separated format?
If your file doesn’t contain comma as data, can you try the following logic then read new.csv using UseExcelFile?

strCsv = strCsv.Replace(";",",")

image

Regards,