OT: How to convert an open office cell HH:MM to a numeric value?

Josef Lowder joe at actionline.com
Mon Nov 30 13:44:14 MST 2009


.
Thanks very much Lisa!
I sincerely appreciate your very helpful answers to so many questions ...
and all of the excellent answers that so many PLUG friends provide.


On 11/29/09, Josef Lowder wrote:
> > How can I convert an open office cell containing a time value (HH:MM)
> > to a numeric value? I've searched the 'net for a couple hours and can't find an answer.

Lisa Kachold replied:
> Here is the formula that will convert the time formatted as HH:MM AM/PM
> to a decimal number.
> =(A2-INT(A2))*24
> So if you have 7:30 AM in cell A2 the result of this formula will be 7.5
> You can apply the same formula to the 2:00 PM cell.
> Assuming that cell is A3 the formula would be
> =(A3-INT(A3))*24
> This formula will yield 14
> Now you can subtract the one result 7.5 from the second result 14 and the
> answer will be 6.5  You can then multiply this by your hourly rate.
> Of course this can all be put into one formula:
> -((A2-INT(A2))*24)+((A3-INT(A3))*24)*12
> The 12 being the rate per hour.


More information about the PLUG-discuss mailing list