oi W!!
here's one i wrote......it'll give ya somthing to start from:
<cfscript>
function convertKB(amt){
var units = " KB";
if(amt LT 1024){
return amt & units;
}else{
amt = round(amt/1024);
units = " MB";
}
if(amt GT 1024){
amt = numberformat(amt/1024,"9.99");//numberformat(amt,"9.99");
units = " GB";
}
return amt & units;
}
</cfscript>
--
Best regards,
Critter, MMCP
Certified ColdFusion Developer
Crit[s2k] - <CF_ChannelOp Network="EFNet" Channel="ColdFusion">
------------------------------------
Sunday, May 26, 2002, 10:10:51 AM, you wrote:
WL> Hi,
WL> I have a database of about 35,000 files with their filenames, sizes, ID tags
WL> and so on. The guy who started this project wrote the sizes of the files as
WL> bytes - and I was wondering if anyone knew of a tag to convert bytes to
WL> MB/GB (if less than 1MB, make it a percentage of 1MB...ie. 0.9MB). I had a
WL> look at devex.macromedia.com but couldn't see any.
WL> Many thanks
WL> Will
WL> -------
WL> Become a Pingographer and share your photos for free:
WL> http://www.localbounty.com/pingo
WL>
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
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