Hi

I have a csv-file containing a column, named Totalhrs, with numbers. The numbers are formatted with a comma as decimal separator, eg. three = 3,00.

I need to sum the values in the column. Therefore I use the formula;

in_dt_data.AsEnumerable.Sum(Function(x) Convert.ToDouble(x(“Totalhrs”).ToString.Trim) ).ToString

However, when eg. the csv-file contains 8 rows, each with value 3,00, I get 2400 as result in stead of 24,00.

The problem is the comma as decimal separator.

So I changed the formula to:

in_dt_data.AsEnumerable.Sum(Function(x) Convert.ToDecimal(x(“Totaal uren (5)”).ToString.Trim.Replace(",“c,”.“c)) ).ToString.Replace(”."c, ","c)

This gives the expected result, but ain’t there a neater way to work with comma delimited decimal numbers?

Is there no way to tell studio/orchestrator which culture settings to use?

Dates are a hell as well

Any suggestions are much appreciated.

Kind regards