Coldfusion - How to Handle Micro Currencies?
Posted on 2009-07-10
I couldn't find a single topic on this anywhere, unusually.
Here's the problem - I have an XML file I need to parse, and the 'cost' data is reported in (what I've discovered to be) 'Micro Currency'. For example, what it actually 81p is shown in the XML as 810000, and likewise £66.87 is shown as 66870000.
As this is the only XML (of several) reporting in this way, I need to convert the values into the 'normal' format (i.e 0.81 & 66.87 using the examples above).
As far as I can tell, CF itself doesn't have anything built in to deal with this. What would be the most effective way of handling it, before doing a cfquery insert?