> I have a series of numbers that can have up two decimal
> places. I'd like to trim the trailing zeroes so that I
> have 9.56, 8.5 and 6 rather than 9.56, 8.50, and 6.00.
> What's the easiest way to do that?
Write a UDF to do it...
Function StripDigits(FormattedNumber)
{
If (right(FormattedNumber,3) is ".00")
{
FormattedNumber=Left(FormattedNumber,Len(FormattedNumber)-3);
}
Else if (right(FormattedNumber,1) is "0")
{
FormattedNumber=Left(FormattedNumber,Len(FormattedNumber)-1);
}
return FormattedNumber;
}
Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911
www.aspmedia.co.uk
www.aspevents.net
An ISO9001 registered company.
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
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