OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Minus 25 sec from a timecode

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
T-buch
General User
General User


Joined: 04 Mar 2009
Posts: 12
Location: Danmark (Denmark), København

PostPosted: Wed Feb 16, 2011 1:41 pm    Post subject: Minus 25 sec from a timecode Reply with quote

I got a value written in the code [TT]:MM:SS,00 for instance: 00:00:30,08
I want to minus 25 sec from that value so the result should be 00:00:05,08

How can I do that?
_________________
Thomas Buch
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Wed Feb 16, 2011 1:56 pm    Post subject: Reply with quote

-25/24/60/60

Calc works on time as a number and decimal fraction of days.
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
T-buch
General User
General User


Joined: 04 Mar 2009
Posts: 12
Location: Danmark (Denmark), København

PostPosted: Wed Feb 16, 2011 2:28 pm    Post subject: Reply with quote

Thanks
But I cannot figure it out how I should understand the "format code": "25/24/60/60 "
first you take 25 seconds, then 24 hours, then 60 minutes and at last 60 seconds
- why is it not:
-24/60/85??? I

If you want to minus (or add) 25 minutes from the value in stead - how do you do that?
_________________
Thomas Buch
Back to top
View user's profile Send private message
Sliderule
Super User
Super User


Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

PostPosted: Wed Feb 16, 2011 2:51 pm    Post subject: Reply with quote

Thomas Buch:

Let us assume your TIME value is in cell A2 . . . the following formula will provide the result you want:

Code:
=TIME(HOUR(A2); MINUTE(A2); SECOND(A2) - 25)


Explanation: Using the TIME function, will return the HOUR, MINUTE and SECOND from the original cell, and, subtract 25 from the SECOND portion . . . per your description.

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your first post Title ( edit button ) if your issue has been fixed / resolved.
Back to top
View user's profile Send private message
T-buch
General User
General User


Joined: 04 Mar 2009
Posts: 12
Location: Danmark (Denmark), København

PostPosted: Thu Feb 17, 2011 2:57 am    Post subject: Reply with quote

Yes thanks, Sliderule - This is easy to understand - but i would also love to understand what is happening in post 2 by Robert Tucker - so I allow myself to wait a little more before adding a "Solved" hoping he or another will explain
_________________
Thomas Buch
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Thu Feb 17, 2011 3:53 am    Post subject: Reply with quote

All dates and times in all spreadsheets are formatted numbers in unit "Days".
You may read any old book on spreadsheets, even 20 year old books, where all this is explained in depth.
You add 5 to a number in order to add 5 days.
You add 5/24 to a number in order to add 5 hours.
You add 5/24/60 to a number in order to add 5 minutes.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group