How to? New datatable column as substring of existing column without for each

Hi @PeCour ,

Maybe you could also achieve the same result with DataColumn.Expression property as shown below :
image

DT.Columns("OutputColumnName").Expression = "SUBSTRING(InputColumnName,1,2)"
1 Like