Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-25-2012, 10:42 PM
|
#1
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Rep:
|
Open Office Calc Formula to Computer Time Duration
Do anyone here knows, formula to compute time duration in calc?
Example:
Time Started Time Finished Duration
08:00AM 09:00 AM = 1 Hour or 1
Thanks in advance.
|
|
|
06-26-2012, 07:49 AM
|
#2
|
Senior Member
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
|
Working with A1, B1, C1:
- Select A1 and B1 and go Format > Cells and change 'Category' to 'Time' and 'Format' to '01:37 PM'.
- Select C1 and go Format > Cells and change 'Category' to 'Time' and 'Format' to '01:37'.
- Edit A1 to contain the start time, then edit B1 to contain the end time (both in HH:MM:SS format).
- Finally, enter '=B1-A1' in C1 and it will display the difference in times correctly.
Hope this helps,
Last edited by Snark1994; 06-26-2012 at 07:52 AM.
|
|
|
06-26-2012, 08:09 PM
|
#3
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Original Poster
Rep:
|
Quote:
Originally Posted by Snark1994
Working with A1, B1, C1:
- Select A1 and B1 and go Format > Cells and change 'Category' to 'Time' and 'Format' to '01:37 PM'.
- Select C1 and go Format > Cells and change 'Category' to 'Time' and 'Format' to '01:37'.
- Edit A1 to contain the start time, then edit B1 to contain the end time (both in HH:MM:SS format).
- Finally, enter '=B1-A1' in C1 and it will display the difference in times correctly.
Hope this helps,
|
Thanks for reply but this is not working.
I want to know if i can make a formula to computer time duration.
Example:
Time Started A1= 10:00:00 AM
Time End B1= 10:30:00 AM
Duration C1= 30 Mins.
|
|
|
06-27-2012, 02:59 AM
|
#4
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Original Poster
Rep:
|
Yeah i already did it.
Thanks for the reply.
This is the formula Ive done.
|
|
|
06-27-2012, 10:37 AM
|
#5
|
Senior Member
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
|
Well... The formula I gave should work with your test data (10:00:00 and 10:30:00). Your formula will show the (positive) difference of the two if the start time is after the end time, which is an unlikely occurrence for well-behaved data - however, I don't know the context of your spreadsheet.
If you consider your problem to be solved, please mark the thread as 'SOLVED'. Thanks 
|
|
|
06-27-2012, 11:05 AM
|
#6
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Quote:
Originally Posted by Snark1994
Your formula will show the (positive) difference of the two if the start time is after the end time, which is an unlikely occurrence for well-behaved data - however, I don't know the context of your spreadsheet.
|
It looks like his mod is to add a day in case the start/end crosses the 24hr border.
|
|
|
06-28-2012, 01:30 AM
|
#7
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Original Poster
Rep:
|
Thanks for all the reply. I am already satisfied on my formula, and i already use it by now.
More powers to LQ.
|
|
|
06-28-2012, 02:47 AM
|
#8
|
Senior Member
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
|
Quote:
Originally Posted by suicidaleggroll
It looks like his mod is to add a day in case the start/end crosses the 24hr border.
|
*facepalm* duhhhh. Sometimes I should remember to switch my brain on. Yeah, that's a more plausible usecase than a start time after your end time...
|
|
|
All times are GMT -5. The time now is 07:42 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|