[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
axelrose
Newbie

Joined: 19 Nov 2011
Posts: 4

 Posted: Sat Nov 19, 2011 10:45 pm    Post subject: How to Subtract/Find Difference between two TIMES ?? In OpenOffice's CALC is their an easy way to subtract/find the difference between TWO times in TWO different cells? start time 1145 pm, end time 455 pm start time 445 pm, end time 955 pm and also how to do it when having to cross midnight _________________Rofl McLolPants says hello. HIS PANTS ARE LOADED AS IF A TRACTOR TRAILER BUT WITH LOADS OF LOVE A THE CAREPOLICE.
Villeroy
Super User

Joined: 04 Oct 2004
Posts: 10106
Location: Germany

 Posted: Sun Nov 20, 2011 1:30 am    Post subject: If the 2 cells are numeric you simply subtract them from each other. This has been explained to you several times in two forums. If the 2 cells have text, you need to tell the program which digits represent hours, minutes and that pm adds 12 hours._________________Rest in peace, oooforum.org Get help on https://forum.openoffice.org
axelrose
Newbie

Joined: 19 Nov 2011
Posts: 4

Posted: Wed Dec 14, 2011 6:45 pm    Post subject: OK

 Villeroy wrote: If the 2 cells are numeric you simply subtract them from each other. This has been explained to you several times in two forums. If the 2 cells have text, you need to tell the program which digits represent hours, minutes and that pm adds 12 hours.

So I get the difference in the 2 times, then multiply by 1440, then divide by 60 for hours, correct??

thanks all.

p.s. I take a lot of medication and forget easily so forgive if I did post same question 2 times, forgive??
_________________
Rofl McLolPants says hello. HIS PANTS ARE LOADED AS IF A TRACTOR TRAILER BUT WITH LOADS OF LOVE A THE CAREPOLICE.
Villeroy
Super User

Joined: 04 Oct 2004
Posts: 10106
Location: Germany

 Posted: Thu Dec 15, 2011 7:07 am    Post subject: You simply subtract and apply some time format to the result. A1: 06:00 B1: 12:00 (both without a specific date) C1: B1-A1 => 06:00 which is 0.25 in unit days when you remove the time format. 06:00 is the same cell value as 0.25. If you really want the amount of minutes as an integer number, multiply the 0.25 days by 1440 in order to get the amount of minutes. Having a time span from 18:00 until next day. A1: 12:00 B1: 06:00 you need the concrete dates added to the times. A1: 12/12/2011 12:00 B1: 15/12/2011 06:00 C1: B1-A1 formatted as [HH]:MM => 60:00 (or decimal 2.5 days) In many cases you may simply assume that B1 refers to the very next day after A1: A1: 12:00 B1: 06:00 C1: =B1-A1+(A1>B1) formatted as [HH]:MM => 18:00 (or decimal 0.75 days) simply adding 1 day if A1 is greater than B1. The comparison (A1>B1) evaluates to either TRUE (1) or FALSE (0)._________________Rest in peace, oooforum.org Get help on https://forum.openoffice.org
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum