At 23:31 08/04/2022 -0500, Dennis Noname wrote:
My pay is basically done by the minute. When I record the hours I
worked, it is expressed 11:55 or 11 hours, 55 minutes. When I record
my hours in OpenOfficecalc, I currently convert the minutes into
fractions of an hour--ie 55 minutes=.9166666--which I'm not sure is accurate.
I'm not sure what inaccuracy you fear: is it just that 55/60 must
necessarily be rounded? Any inaccuracy will be limited to a hundredth
of a second; I doubt you employer is going to dock you pay for
leaving work a hundredth of a second early. Put another way, your
hourly pay rate may be misrepresented by as much as a five-hundredth of a cent.
Is there a way to multiply 11:55 by a dollar amount--say 9.75 to get
the exact dollar amount earned or am I doomed to always converting
the minutes to decimals?
As always with spreadsheets, it may depend on exactly what you have
in your cell, and what you see is not always what you have. If you
enter 11:55 into a cell not otherwise formatted, the value will be
interpreted as a time and the cell formatted as a time, so you will
see 11:55:00 by default. You can change this format to show 11:55
(still as a time) if you wish. Alternatively, if you format the cell
as Text before you enter the value (or depending on how you paste
values in) you may have the same appearance of 11:55, but this time
as a text string - which will be left-aligned by default.
Time values are represented internally as fractions of a day, so what
shows as 11:55 is actually 0.49652..., or just under half a day. If
that pay rate is dollars per hour, all you need to do is to multiply
the time by 24 - to convert it to hours - and then multiply by the pay rate:
=Xn*24*9.75
And life is easier than you think if what you have are actually text
values. If you incorporate a text value into a numerical formula in
this way, the text value is automatically converted on the fly to its
numerical value. So - perhaps surprisingly - the same formula will
work for text values.
Incidentally, it may be helpful to place the pay rate in a cell of
its own and then refer to that in your formulae. That way, any change
of pay rate (I'm guessing you may hope for those?) will require
changing one cell instead of wholesale reconstruction of formulae.
I trust this helps.
Brian Barker
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org