[Solved] Time & Minutes In Quarters...

Discuss the spreadsheet application
Post Reply
User avatar
JoelP
Posts: 81
Joined: Fri Oct 10, 2014 4:19 pm

[Solved] Time & Minutes In Quarters...

Post by JoelP »

Hello Team,

I am looking to make the attach spreadsheet time and minutes calculate to .25 same as quarters.

For Example:

Cell Z7 Input: 08:00 AM
Cell AG7 Input: 03:15 PM
Cell AD8 Auto Input: 07:15 that is a total of 7 Hours and 15 minutes. I need it to read 7.25 meaning 7 hours and a quarter
Cell AJ8 Auto Iput: 07:15 that is a WTD total of Hour and 15 Minutes. I need it to read a 7.25 which is 7 Hours and a quarter.

I will need this same formula for the whole sheet from Thursday to Wednesday.

Your help is greatly appreciated...

Thanks,

Joel...
Attachments
Pay Sheet Calculator.ods
Pay Sheet Calculator...
(17.52 KiB) Downloaded 90 times
Last edited by robleyd on Tue Nov 21, 2017 3:59 am, edited 2 times in total.
Reason: tagged [Solved]. robleyd moderator
OpenOffice 4.1 on Windows 10
FJCC
Moderator
Posts: 9274
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Time & Minutes In Quarters...

Post by FJCC »

Change the format of AD8 to be a number format and change the formula to be

Code: Select all

=IF(OR(ISTEXT(Z7);ISTEXT(AG7));0;IF(AG7-Z7<0;AG7+1;AG7)-Z7) * 24
That will give you a numeric result in units of hours. Times and dates are in units of days, so multiplying by 24 changes the result to hours.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
JoelP
Posts: 81
Joined: Fri Oct 10, 2014 4:19 pm

Re: Time & Minutes In Quarters...

Post by JoelP »

Hello Team,

When I try changing the formula it actually calculates 174 for some reason.

Are you able to add the formula direct to the cell so I can see it become the .25 for every 15 minutes of the hour.

Your help is truly appreciated...

Thanks,

Joel...
OpenOffice 4.1 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Time & Minutes In Quarters...

Post by Villeroy »

FJCC's formula pasted into any empty cell of your sheet returns 7.25
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
FJCC
Moderator
Posts: 9274
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Time & Minutes In Quarters...

Post by FJCC »

See AD8
Attachments
Schedule.ods
(17.4 KiB) Downloaded 103 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Time & Minutes In Quarters...

Post by RusselB »

The 174 is the display using the [HH]:MM cell format for the calculated number of 7.25
Change the format of the cell to General
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
JoelP
Posts: 81
Joined: Fri Oct 10, 2014 4:19 pm

Re: Time & Minutes In Quarters...

Post by JoelP »

Hello Team,

Thanks to all for all your help. I was able to get it resolved.

The fix was easier than I anticipated but off course with the help of all of you. Thanks so much to all again...

Thanks,
Joel...
OpenOffice 4.1 on Windows 10
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Time & Minutes In Quarters...

Post by RusselB »

FYI an explanation of why you were seeing 174 for an entry of 7.25
7.25 in Calc as a date represents 7.25 days, not 7.25 hours.
7 days at 24 hours each is 168 hours
.25 days at 24 hours is 6 hours
168 + 6 = 174
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: [Solved] Time & Minutes In Quarters...

Post by Lupp »

Just a word from the backseat:
RusselB wrote:7.25 in Calc as a date represents 7.25 days, not 7.25 hours.
That's not quite correct. Dates are integers (whole numbers) in Calc. 7.25 can be interpreted as a date-time value, however. This done it stands for "1900-01-06 06:00:00" if the default setting for day zero (1899-12-30) was not changed.
Spreadsheets always mess up Time-Of-Day which gravely depends on conventions and enactments with the technical/scientific quantity time which is the physical quantity nowadays measurable with the highest precison of all quantities (rel. about 10E-17). We won't need that high precision, but we need a valid concept of duration. Spreadsheets haven't any. If we nonetheless use numeric values in spreadsheets together with the standard formatting facilities we have to accept the usage of the day as the default unit of time ignoring the fact that the day is basically unsuitable for the purpose since it hasn't a well defined duration.
Just one example from my pay-sheet, given in a way valid in Germany:
If I enter 2017-03-26 01:30 under StartOfWork and 2017-03-26 03:30 under EndOfWork for an emergency rescuer, and calculate the duration as the difference with Calc, I get 2.00 hours. In fact it was 1.00 hours. A StartOfWork of 2017-03-26 02:30 will also be accepted despite the fact that this point of time didn't exist at all due to decreed time-shift.

Hopefully the OQ never has to calculate durations spanning a time-shift. He wouldn't worry about the occasional leap-seconds, but probably about the fact that at the time-shift in the autumn there is an hour which must be passed twice. How to handle in Calc?
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Post Reply