Does anyone have a simple method to convert a numeric value into a currency type format?
1000 10000 100000 1000000 etc.
etc.
Thank you. [import]uid: 61463 topic_id: 10594 reply_id: 310594[/import]
Does anyone have a simple method to convert a numeric value into a currency type format?
1000 10000 100000 1000000 etc.
etc.
Thank you. [import]uid: 61463 topic_id: 10594 reply_id: 310594[/import]
Try that oneā¦
function comma\_value(n) -- credit http://richard.warburton.it
local left,num,right = string.match(n,'^([^%d]\*%d)(%d\*)(.-)$')
return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right
end [import]uid: 10478 topic_id: 10594 reply_id: 38533[/import]