Can you guys assist me in filtering the data i want to be extracted in a table. I have a table with two columns (Document & Printing Time) In the Document Column i want to output only the Document Name that start with “HC-AG” and in Printing Time i want to change this date format e.g “Jun 11, 2019 4:03:06 PM” to “2019-06-11 4:03:06”. Your response will be highly appreciated. Y
Hi @BigDee
Welcome to uipath community buddy
–First lets filter the datatable with the column Document using filter datatable activity
where you can mention the input datatable of your extracted datatable and the column name between quotes like “Document” and use the condition as CONTAINS and the value as “HC-AG”
and we can get the output datatable of name out_dt, a variable of type datatable
–now once after the getting the output filtered datatable named out_dt from the filter datatable activity use a for each row loop and pass the variable out_dt as input
–inside the for each row loop use a assign activity like this row(“Printing Time”) = Datetime.ParseExact(row(“Printing Time”).ToString,“MMM dd, yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd hh:mm:ss”)
thats all buddy you are done
Kindly try this and let know for any queries and clarification
Cheers @BigDee
Thank you for response @Palaniyappan AND @AnandKumar26 . Please bear with me i’m still a rookie, but with your help i strongly believe that i’ll be fine. I don’t know how or where to put the for each loop can you please elaborate on that. which button to click in order for arrive there after putting out_dt as an Output datatable( it says " value for a required activity argument is not supplied ‘Datatable’ was not supplied")
Fine can i have a screenshot of your xaml , the workflow been made so far if possible
or if not let us know we would send you a xaml buddy
Cheers @BigDee
Fantastic you were almost done… @BigDee
we need to mention this buddy input datatable
pass the output variable from previous activity extract structured data ‘Table’ as input to this filter datatable activity
once after this kindly share the screenshot of filterwizard once buddy
Cheers @BigDee
Done! now how do i implement the for each loop and assign this activity row(“Printing Time”) = Datetime.ParseExact(row(“Printing Time”).ToString,“MMM dd, yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd hh:mm:ss”)
both contains and starts with works the same buddy
only thing it makes difference is contains doesnt bother whether it is in first or last or middle, but will check all the occurence, thats why i mentioned that
whille starts with will check only the starting part of the string
Cheers @BigDee
well the out_dt is the variable that we pass to filter datatable activity, so we need to get the output from the filter datatable activity with a different output variable name of type datatable
create a variable named final_dt in the variable panel and mention the default value as new system.data.datatable
and mention this as output in the property of filter datatable activity
–Then after this use a for each row loop next to this filter datatable activity and pass the input as final_dt
–inside the for each row loop use a assign activity
like this row(“Printing Time”) = Datetime.ParseExact(row(“Printing Time”).ToString,“MMM dd, yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd hh:mm:ss”)
Kindly try this and let know for any queries
Cheers @BigDee
@Palaniyappan buddy i can tell that we almost done. Thing is i’m struggling to implement the for each loop. I do not know how to put it next to the filter database activity. Please bear with me.