first of all i must apologize for me spelling and not searching for an answer i am tired and am going to sleep soon... and i hope that i might just have an answer when i wake up
ok so i am working on a spreadsheet and for an example:
store capasaty(c:2) divided by income(d:4)= (f:4) is the time to fill the storage the result that comes back is something like 1.5 (for an hour and a half)
how can i change this to display as 1:30 hours and not 1.5 please?
my next question is: the time in decimal numbers can be returned as a negative number in such a case i want the display to say 0:00 and not a negative number how do i do this please?
my other question is can i use this time remaining to to calculate the time and date it will be when the store is full and how do i make this display and a dd/mm and hour:minutes format please?(year is not required)
Any help is useful i am not a first time user to open office but this is the first time i have dealt with times on a spreadsheet and i find the help files a bit confusing
again thanks for any help offered!
Converting decimal numbers into time formats
Converting decimal numbers into time formats
OOo 3.0.X on Ms Windows XP
Re: Converting decimal numbers into time formats
Times in Calc (or Excel, for that matter), are stored as a fraction of one day. So, 0.5 is one-half of a day, or 12 hours; displayed as "12:00".
So, to convert a decimal number of hours to a time value, you need to convert to a number of days--i.e. divide the hours by the number of hours per day: hours / (hours per day) = days; 1.5 / 24 = 0.0625, formatted as time: 01:30:00 AM.
You can calculate times using simple addition and subtraction, because the times are just normal decimal values.
I try to avoid displaying something that's unrelated to the cell's value (zero instead of a negative value). Better to either accept the negative number, or change your design to avoid producing them at all.
So, to convert a decimal number of hours to a time value, you need to convert to a number of days--i.e. divide the hours by the number of hours per day: hours / (hours per day) = days; 1.5 / 24 = 0.0625, formatted as time: 01:30:00 AM.
You can calculate times using simple addition and subtraction, because the times are just normal decimal values.
I try to avoid displaying something that's unrelated to the cell's value (zero instead of a negative value). Better to either accept the negative number, or change your design to avoid producing them at all.
AOO4/LO5 • Linux • Fedora 23
Re: Converting decimal numbers into time formats
I think the OP was looking for a display of time as in 1 hour 30 mins, rather than time of day so the time format to choose would by the 24 hour clock one (13:37), but this is still problematic, if you have to go over 23 hours 59 mins because it then starts at 00:00 again. So in reality it is better to stick to one unit, either hours or minutes.So, to convert a decimal number of hours to a time value, you need to convert to a number of days--i.e. divide the hours by the number of hours per day: hours / (hours per day) = days; 1.5 / 24 = 0.0625, formatted as time: 01:30:00 AM.
In this case would use =if(C2/D4<0;0;C2/D4) or if you still want to use the hh:mm format =IF(C2/D4<0;0;C2/D4/24)store capasaty(c:2) divided by income(d:4)= (f:4) is the time to fill the storage the result that comes back is something like 1.5 (for an hour and a half)
my next question is: the time in decimal numbers can be returned as a negative number in such a case i want the display to say 0:00 and not a negative number how do i do this please?
OOo 3.3 on Windows 7 & 3.2.1 on Mint 10