madman411 Posted May 22, 2012 Posted May 22, 2012 Hey guys, I've developed a small application used by data technicians (me) on film sets which keeps track of how much data has been transferred and stored from the camera magazines. I have a portal where the tech can enter how much data was transferred, whether it's in kb, mb, gb, tb, etc. I need to develop some way for the user to define if the data transferred was in megabytes, or terabytes, (etc), and for a field to calculate the total transferred for the day. I want the field to be able to automatically trail the total with a "mb", "gb", or "tb" depending on how big the total is (kind of how Finder on Mac can determine how much space is remaining on the hard drive). Any input is appreciated as I'm unsure where to start here aside from the basic calculations. Cheers!
comment Posted May 22, 2012 Posted May 22, 2012 Assuming you know the total throughput in bytes, start by calculating the order of magnitude as = Case ( throughput ; Floor ( Ln ( throughput ) / Ln ( 1024 ) ) ; 0 ) Then you can use the result to select the correct suffix, e.g. = Case ( magnitude ; Middle ( "KMGTPEZY" ; magnitude ; 1 ) & "B" ; "bytes" ) 1
comment Posted June 2, 2012 Posted June 2, 2012 Well, I was beginning to think this one has gone unnoticed, but apparently I was wrong: http://www.briandunning.com/cf/1447 :no:
Recommended Posts
This topic is 4927 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now