I collect datas from a terminal session.
example : price = 1.117 rate = 0.318
the initial format is String.
Then I need to convert to Double coz after i need to control the datas by doing calculs
like this one :
doublevalue1/1.08 * (1.08+ doublevlaue2/100)*(1+ doublevalue3 + 0.1)
When i collect the value 3, at the beginning it is 0.318, when I convert into Double (in order to make a calcul), i only have 318 (the zero desapears)
Can someone know I can I do to keep the format 0.000 in a double variable please ?
Hope I’m clear enought.
Thank you in advance
Maybe @ppr@PD2 you can help me out please ?
Thanks again
Can you give me more details, sorry i understand what you did but not sure to reproduce it.
To be more precise, I collect the data in differents workflows.
I convert them into argument double type. It is okay coz I have value like 1.xxx
But in a specific Wf, i have to collect the rate from an excel file. I have a list and I have to pick the right rate. all the rate are 0.xxx format (0.318, 0.125, etc.)
So when i convert this rate into a double format, it appears with the “writeline” that it returns 318 instead of 0.318 (this value is not fix and it depends on the article)
And in the following wf, I have to control and do some math.
And here, with my formula : in_PCI/1.08 * (1.08+ in_FTE/100)*(1+ in_TauxMarge + 0.1) I have a wrong answer
the “in_TauxMarge” (my rate) is 318, instead of 0.318
shown in the screenshots, we can conver strings into double e.g. the Line1,2
just debug and confirm that is also in the datatable 318
if so we can investigate more on the lost 0. case
Also play wiht Changing Cell formatting, Ensure Excel Application is use …
Perfect, I’ve assigned this to my double argument : Convert.ToDouble(Double.Parse(str_TauxMin,Culture))
the variable culture (cultureinfo type) is set to : new CultureInfo(“fr-FR”)
So the output is now 0.318 ! perfect ! Thanks a lot !