> We have some numbers to display that have 5 decimal places in the Database > but we only want to display two of the decimal places but without rounding > the up or down, in other words 10.69751 needs to display as 10.69. Using > Number( or LSNumber( and masks rounds the number up or down. > > Anyone got any ideas on this? >
Man, this is an ugly way to do it, but the only way off the top of my head. Cut and paste this one to see the output: <cfset number = 10.298765> <cfset wholenumber = ListFirst(number, ".")> <cfset decimal = Left(ListGetAt(number, 2, "."), 2)> <cfset newnumber = wholenumber & "." & decimal> <cfoutput>#newnumber#</cfoutput> Just a thought. I tried things like ToString() thinking that would help, but CF still rounds it. I'd be curious to see other solutions, if any, myself. Regards, Dave. ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

