Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index


Hi,
If it is pure display you are looking for, then the difference in days
is:
=INT((A2+B2)-(A1+B1)) with a numbers display format (such as # ##0)
the difference in hours is:
=(A2+B2)-(A1+B1) with a display format set to [h]
You can be a bit fancy and set the # days format to be # ##0" days" and
the # hours to be [h]" hours"
I hope this helps.
Rémy.
Le vendredi 25 mai 2018 à 10:42 +1200, Steve Edmonds a écrit :
Interesting how people think differently.
Assuming dates have cell format date and time has cell format time;
I came up with days first  = (A2+B2)-(A1+B1) (cell format general)
hours = days*24 (cell format general)
steve

On 25/05/18 10:05, Michael D. Setzer II wrote:
Divide the difference by an hour, and you get the hours, and then
divide that
by 24 or could do the same and divide by 24 hours.


05/16/18    08:30:00 PM        111.58                      
                         4.65
05/21/18    12:05:00 PM        '=((A2+B2)-
(A1+B1))/TIME(1,0,0)        '=C1/24


On 24 May 2018 at 15:07, James wrote:

To:                 users@global.libreoffice.org
From:               James <bjlockie@lockie.ca>
Subject:            [libreoffice-users] difference in hours
between two
times
Date sent:          Thu, 24 May 2018 15:07:15 -0400

I have a calc spreadsheet with column A being a date and column B
is a time.
I am trying to make a foruma that calculates the difference in
days and
another for the difference in hours between 2 rows.

For example:
column A
Wed, May 16, 2018
Mon, May 21, 2018

column B
08:30 PM  
12:05 PM

column C
=((A13+B13)-(A12+B12))
=((A14+B14)-(A13+B13))[4.65]

column D
=TRUNC(C13)
=TRUNC(C14) [4]

column E
-
formula? [.65]


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.or
g
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-
to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Ne
tiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

+------------------------------------------------------------+
  Michael D. Setzer II - Computer Science Instructor (Retired)
  mailto:mikes@guam.net
  mailto:msetzerii@gmail.com
  Guam - Where America's Day Begins
  G4L Disk Imaging Project maintainer
  http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC@HOME CREDITS

ROSETTA      65540984.279607 | ABC          16613838.513356
SETI        109371053.691072 | EINSTEIN    141058465.999240




-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.