Micro Focus QTP (UFT) Forums
Need help on numeric value display - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Need help on numeric value display (/Thread-Need-help-on-numeric-value-display)



Need help on numeric value display - AutomationTester2011 - 07-19-2011

Hi

var = 9900/500
PRINT var

O/P1: 19.8


var1 = 10000/500
PRINT var1

O/P2: 20

I want the results to display in the format mentioned below.

19.80 and 20.00

Can anyone give the easy solution for this?


Thanks in advance



RE: Need help on numeric value display - rajpes - 07-19-2011

Print FormatNumber(var1,2)


RE: Need help on numeric value display - AutomationTester2011 - 07-19-2011

Thanks a lot raj Smile


RE: Need help on numeric value display - rajpes - 07-19-2011

welcome ...