How to convert currency

The data which im getting from invoice total from pdf which is in USD and i’ve to convert that to INR and update in Application

Thanks in Advance

Yah that’s possible
If the input is like
Str_input = “120”
Then
db_INR = Convert.ToDouble(Str_input)*(70.52)
Where db_INR is a double datatype variable

Cheers @Pradeep_Shiv

1 Like

so if is use double data variable ill get converted result??

got it thank you!!

1 Like

@Pradeep_Shiv

If you are ok with hardcoding the value, then it is fine else actually, in the business perspective, you have to get the actual value of currency, I mean 1 $ = ? INR, instead of hardcoding it. So, we have web services which will give you the dollar rate every day. So, you have to use that to get the actual value of dollar every day.

1 Like

Yah
If we want that to updated frequently then before this conversion these steps would help your resolve this
—use open browser activity and mention the url as “www.google.com” and mention the browser as IE
-inside this scope use a TYPE INTO ACTIVITY and mention like this “us dollar to indian”
—then use GET TEXT activity and get the numerical value as a string output variable named str_convert
—use that str_input in the above expression Like this
db_INR = Convert.ToDouble(Str_input)*Convert.ToDouble(str_convert)

So that it will update the value INR automatically everyone you run
Cheers @Pradeep_Shiv

1 Like

The first method what you told is working fine but i’ve been getting more than 2 decimel ,how can i stop to only 2

1 Like

Yah like this
String.Format(“{0:0.00}”, db_INR.ToString)

Cheers @Pradeep_Shiv

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.