Hope You are Doing Well
I have a situation where i am stuck from soo many days, I Want Filter multiple data dynamically from single excel column, Column Contains Date in :- dd-MM-yyyy Format, I want To Fetch Current Year and Current Running Quarter Data From it. if available else ignore it.
Hope the below steps would help you resolve this
—read the excel with excel application scope and get the output as datatble dt
—now use a FOR EACH ROW activity and pass the dt as input
—inside the loop use a IF condition as
Date.TryParseExact(row(“date column name”).ToString.SubString(0,10).ToString.Trim,“dd-MM-yyyy”,Nothing,Globalization.DateTimeStyles.None,Nothing)
This condition gives us true if the data in that DATE column is in the format we need and if so it goes to THEN block where we can get the value we want
did the steps worked
Pls let know for any clarification
No Sir, This Steps Didnt Helped me, i am attaching image of my excel for refence , please look in it, also i have manually filtered and highlighted current year and current q2 data.
Steps i performed in it:- The dates were in number formats, i converted the date to dd-MM-yyyy format and splitted the variable by - to get year and months, but now m stuck here .
so is this step on conversion is done
and if my understanding is right we are stuck at getting the year and month from that converted date format
pls mention the expected output if possible with a screenshot
Expected output is we need all the data if merger date column contains data of current year and in current year we have to filter for only current quarter months only,if not available then ignore, attaching screenshot of manually filtered data. also i tried using OR approch but i am failing because it only fetchs 1 true condition.
Hi @ankit.mehta ,
Try below code and let me know if you face any issue.
I have attached output of test file.
test.xaml (9.6 KB)
GetSpecificDateData.xlsx (9.8 KB)
here you go with the solution
I have simulated in a way that whenever you run this bot at any quarter of the year, it will pick that quarter data alone
say for example if you run in Jan of the year it will pick only the first quarter data
extractquarterdata.zip (11.1 KB)
Thanks For Your Time and reply.
@Palaniyappan Thanks Brother, I was looking for this only.
Appreciate your Efforts.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.