Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issues with comparison
#1
Solved: 10 Years, 9 Months, 1 Week ago
I have 2 variables whose values are as follows:

Var1 = 65,000
Var2 = 65000

The value of the first variable is obtained through 'Split' function of a innertext property of an object while the second variable is the value obtained from the text displayed in a text box.

My objective is to compare these 2 variables and the result should be that both are same.

for example:
strcomp(var1,var2) result should be 0.

Please let me know how do I accomplish this.
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
remove ',' from the first variable and then compare. you can use Replace function

Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
I just gave the " " as an example but the script that I am using displays 65,000 if I do a msgbox on the variable.
So, my query comes down to simply removing the , from the 65,000. How do I do it?
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago
Var1 = "65,000"
MsgBox Replace(Var1, ",", "")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Files comparison using QTP santosh.msr 0 2,041 07-11-2016, 11:38 AM
Last Post: santosh.msr
  Performance Issues Using '.Exist' AndyBSG 2 3,178 12-12-2014, 03:24 PM
Last Post: AndyBSG
  XML diff comparison bubblehead 0 5,457 05-21-2014, 12:01 PM
Last Post: bubblehead
  QC Install issues manisun 0 10,948 08-15-2012, 02:01 AM
Last Post: manisun
Toungue Two dialog box issues mv8167 3 3,769 09-28-2011, 11:09 PM
Last Post: mv8167

Forum Jump:


Users browsing this thread: 1 Guest(s)