My first thought was to just use the left function
and cut the number down to the size you want:

        <cfset newNumber = left('9.09090909090909E 106', 6) />
        
        <cfoutput>newNumber = #newNumber#</cfoutput>

        newNumber = 9.0909

Then you can do with it as you please.

Would that work?

Rick

-----Original Message-----
From: James Holmes [mailto:[email protected]] 
Sent: Saturday, November 26, 2011 4:05 AM
To: cf-talk
Subject: Re: Converting scientific notation to pure numeric


Try removing the space between the E and the exponent, or replacing it with
+
--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 26 November 2011 15:30, Mike Kear <[email protected]> wrote:

>
> I'm having a brain fade at the moment, or perhaps it's a senior
> moment.    Hopefully someone here can help.    An external device is
> sending data to my website in XML format, which my site processes and
> makes available to logged-in users.   It's worked fine for more than a
> year, but for the first time, we have a value that is calculated in
> the external device and has a recurring decimal value.     So now
> instead of a simple value with 4 decimal places,  I'm dealing with a
> value like '9.09090909090909E 106'




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348872
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to