0

What i have is a time series as below

  • 2018/01/01, 100
  • 2018/01/02, 50
  • 2018/01/03, 0.05

I divide each value by 1000

the result looks like this

  • 2018/01/01, 0.1
  • 2018/01/02, 0.05
  • 2018/01/03, 5E-05

now the problem with the 3rd data point is it's scientific.

This series gets exported and processed by another system which crashes (the other system is not ours)

I've tried a string.Format ("{0:N8}", 0.05/10000) but then this does the same format for all datapoints which is not desired for the client. And if there are more than 8 decimals then it results in a loss of decimals

Is this a culture problem? anyway around this

I would like the 3rd data point to be displayed as

  • 2018/01/03, 0.00005

Not

  • 2018/01/03, 5E-05
UndeadEmo
  • 433
  • 1
  • 6
  • 15
  • You didn't specify in the question how you're creating the output - `0.0000000000005M.ToString()` outputs `0.0000000000005` ..? – stuartd Jan 07 '19 at 15:33
  • 1
    Looks useful: "Format double type with minimum number of decimal digits" https://stackoverflow.com/questions/7433539/format-double-type-with-minimum-number-of-decimal-digits – johey Jan 07 '19 at 15:35
  • @johey thank you that worked (n.ToString("0.00###")) – UndeadEmo Jan 15 '19 at 10:15

0 Answers0