Hello all, this is the data table I am having,
From the column name “Material”
- I wish to extract the value which starts from digit ‘5’.
- The value then extracted should exclude all preceeding 0’s from it
Regards,
Hardik Durgam.
Hello all, this is the data table I am having,
Regards,
Hardik Durgam.
Hi @Hardik_Durgam,
(from s in dt.AsEnumerable where s(“Material”).tostring.trimstart("0"c).Startswith(“5”) select s(“Material”).Tostring.TrimStart("0"c)).ToArray
This gives all required data in array of string.
Hope it helps.
It gives in Array of String format.
@Harshith_Adyanthaya ,
No According to @Harshith_Adyanthaya method it will be stored in an Array of string .
Put a for each loop for the array . there you will get the each items inside for each.
Regards,
String.Join(“,”, (from s in dt.AsEnumerable where s(“Material”).tostring.trimstart("0"c).Startswith(“5”) select s(“Material”).Tostring.TrimStart("0"c)).ToArray)
This will give all values in String. Comma seperated.
@Hardik_Durgam ,
FilterDataTable03.zip (2.2 KB)
FilterDataTable03.xlsx (8.5 KB)
This workflow returns the values which starts with 5 Individually.
Let me know if this is not your required output
Regards,