I import from excel the following table:
When imported it is detected as datetime. And I want to save all the values into a single string variable, with format dd/MM/yyyy and separated bi semicolons, like this:
variable = “23/03/2022;24/03/2022;25/03/2022”
give a try:
String.Join(";", YourDataTableVar.AsEnumerable.Select(Function (x) CDate(x(ColNameOrIndex).toString).toString("dd/MM/yyyy")))
Thanks ppr!! It worked fine!!!
Marked as solution
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.