Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index


Hi,
If it's just showing, using a numbers format defined as [m] ("m"
between square brackets) will do the job. Since it is time, there
should be no decimal minutes to show and this format should work out.
Using this format will also allow you to continue making operations
with the time values without having to think about the units of what
you are manipulating. And if you want to show seconds, [s] is the
format to use.
As a side note, the "time" format of Calc is days (the value 1 is
equivalent to 24 hours), so multiplying the time value by 24 will give
you decimal hours, multiplying the time value by 24*60 will give
minutes, and  by 24*60*60  will give seconds. Once you have the number
you can use standard decimal number formats will display whatever units
you want to use with the number of decimal places you are looking for.
You can also go the other way: to encode, say, 7 hours and 41 minutes,
use this formula: =(7+41/60)/24.
I hope this helps.
Rémy.
Le vendredi 17 juillet 2020 à 15:50 +0200, Luuk a écrit :
On 17-7-2020 14:37, Gilles wrote:
Hello,
I have a spreadsheet where time is formatted as HHhMM.
In the next column, I'd like to show this in minutes. What would be
a goodway to achieve this?
Thank you.
https://i.postimg.cc/qRKCK14F/image.png



--Sent from: 
http://document-foundation-mail-archive.969070.n3.nabble.com/Users-f1639498.html

if A2 = "01h14"
Then the formula: =TIMEVALUE(REPLACE(A2;3;1;":"))*24*60
Will return: 74

Basically first replace 'h' for an ':'
timevalue returns the minutes since midnight.


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.