I have an issue when I want to select a datarow from a “build data table” activity.
I buil a data table with 2 columns : Date(string) and Price(string)
I get information from a MainFrame : Date and Price
I store them into string variables : Date1, Price1, Date2, Price 2, and so on…
date output is for example : 03.09.2018 etc
I have had Add Data Row to put the variables into the datatable
Then I need to choose only the price with the most recent date.
I tryied this formula :
Assign : str_RecentDate : dt_DatePv.AsEnumerable.Select(Function ( r ) r(1).toString.Trim).OrderBy(Function (s) DateTime.ParseExact(s, “dd.MM.yyyy”, System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat)).Last()
But I have an error message :
Assign : The string was not recognized as a valid DateTime.
Can anyone see where is my mistake please ?
Thank you !