| View previous topic :: View next topic |
| Author |
Message |
Jsword Newbie

Joined: 08 Oct 2011 Posts: 4
|
Posted: Sat Oct 08, 2011 3:06 pm Post subject: Get difference between two times |
|
|
hi there
i have two columns A,B of type time for example: 10:12 AM
and i have column C and i want to get the difference between A,B in it
as hours:minutes, please describe to me how to do that
thanks in advance. |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Sat Oct 08, 2011 3:12 pm Post subject: |
|
|
=B1-A1 _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
Jsword Newbie

Joined: 08 Oct 2011 Posts: 4
|
Posted: Sun Oct 09, 2011 12:12 am Post subject: |
|
|
where or how to add this: by double clicking on a cell and add above formula
or insert it as new function or what, please describe. |
|
| Back to top |
|
 |
philb1 OOo Enthusiast

Joined: 21 Mar 2011 Posts: 111 Location: Auckland
|
Posted: Sun Oct 09, 2011 6:29 pm Post subject: |
|
|
If you have a time in cell A1 and a time in cell B1, type =B1-A1 into cell C1, press enter & it will give you the time difference in hours, minutes & seconds
Change the times in A1 & B1 as you like. |
|
| Back to top |
|
 |
Jsword Newbie

Joined: 08 Oct 2011 Posts: 4
|
Posted: Sat Oct 15, 2011 7:10 am Post subject: |
|
|
do i have to do that for each field ?
what if i wanted to make this formula for all cells in the column
i want to insert a formula for the whole column, so that each time two times are entered in any cell, automatically the third column will calculate the difference, got me ? |
|
| Back to top |
|
 |
Jsword Newbie

Joined: 08 Oct 2011 Posts: 4
|
Posted: Sat Oct 15, 2011 7:19 am Post subject: |
|
|
well. i managed to do it as follows:
in one of the cells in c i used the formula: =(C2<B2)+C2-B2
then i dragged the thin border of this cell and expanded it to other cells of this column, and then the formula is applied to other cells in the column. |
|
| Back to top |
|
 |
|