English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

divide 2.6 by .25, .50 and .75

2006-11-06 05:52:04 · answer #1 · answered by waggy_33 6 · 0 0

I don't quite know what you're asking but here's a link on conversion in general. Your above example isn't a conversion and 2.6 equals 2.60 hours-none of the following..

2006-11-06 14:08:02 · answer #2 · answered by Middleclassandnotquiet 6 · 0 0

I'm going to assume that you mean how to convert 2 hours and 6 minutes, entered as hh.mm, to hours and minutes in base 100 decimal format, because otherwise this question makes no sense.

It would depend on what application or language you were trying to do this in. Here is an example how to do this in Excel. If you want to cover all the ways someone might enter it, it becomes a little tricky (well, maybe alot tricky, but this is fun, and you will probably learn something cool, so here it is).

First, the number of whole hours would stay what they were - the function you could use would be "INTEGER(X)", such as in excel, the function would be =INT(2.6), which would return "2".

The next problem you have is that you need to be able to represent all the digits to the right of the decimal as a whole number of minutes, otherwise 2 hours and 6 minutes could be entered as 2.6 or 2.06, and 2hrs and 15 mins could be entered as 2.15, which would appear to excel to be less that 2 hours and 6 mins entered as 2.6 .

To do this, You will need to let excel evaluate how it was entered, and interpret the "appearance", rather than the true value. First determine how many digits are entered to the right of the decimal, to allow 6 minutes to be entered as ".6" or ".06"

create a blank excel spreadsheet. Enter the value 2.06 into cell A1


=TEXT(A1,"general") would return the "2.06" as a character string, displayed in excel's "general" format

=LEN(TEXT(A1,"general")) would tell you "2.06" is 4 chars in length.

=FIND(".",TEXT(A1,"general")) would tell you that the decimal point is located at the 2nd char of the string 2.06. it would tell you that it was the 3rd char in the string "18.6" .

if you subtract the position of the decimal from the length of the total character string, you will get the number of characters that are typed to the right of the decimal. If you use this as the "number of characters" in the "=RIGHT" function, you will always get a whole number representation of the decimal figure, no matter how it is typed. So here is a finished formula for extracting the number of minutes:

=RIGHT(TEXT(A1,"general"),LEN(TEXT(A1,"general"))-FIND(".",TEXT(A1,"general")))

(seems like yahoo answers doesn't display the whole line above, but if you point your mouse at it you should see the whole formula)
divide this result by 60 to get the decimal representation of the minutes. Add this to the integer of the same number =INT(a1)

so the entire formula will be:

=INT(A1)+(RIGHT(TEXT(A1,"general"),LEN(TEXT(A1,"general"))-FIND(".",TEXT(A1,"general")))/60)

(seems like yahoo answers doesn't display the whole line above, but if you point your mouse at it you should see the whole formula)
enter the formula exactly as I have typed it.

if you enter 2.15 (2 hrs 15 mins) into A1, you will get 2.25
if you enter 2.06 (2 hrs 6 mins) into A1, you will get 2.1
or
if you enter 2.6 (2 hrs 6 mins) into A1, you will still get 2.1

2006-11-06 14:26:33 · answer #3 · answered by boonietech 5 · 0 0

fedest.com, questions and answers