[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Edit mask



Larry Roux provided the solution.

Let #tempvar = ''00728436'
Let #tempvar = #tempvar * .01  
Let $outvar = edit(#tempvar,'999999.99')

I'll try to explain in simple terms.

Multipling by .01 moves the implied decimal within the variable to the second 
position. Then when edited as above or with a print command, the decimal point 
will print where you are wanting it.

example:

your field (let's call it #field) contains "00728436^"    (^ = implied decimal 
position)

"let #field = #field * .01" moves the implied decimal position to "007284^36"

Then when you edit, the decimal point will print between the 4 and the 3 (where 
the implied decimal position moved to after the multiply)




>>> ramakrishnan.vaidyanathan@ge.com 2006/10/13 12:02:50 >>>
Hi All
        Is there any way to edit mask the number such that the last 2 digits 
shud always be a decimal portion. For eg if i have a number 1234 then it shud 
be masked in suach a way that the result shud be 12.34. If the no is 123456 
then result shud be 1234.56. Is there any way to acheive this?
Thanks In Advance
Ram

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org 
http://www.sqrug.org/mailman/listinfo/sqr-users


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users