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


Am 20.07.2011 07:16, Dennis E. Hamilton wrote:
It seems that OpenOffice.org and LibreOffice Calc will infer the type
of a cell from the type of the formula result if no other type information is provided. As far as I know, that is how results like 01:15 instead of 01.25 show up when the formula produces a date-time type of value. If you want something different, it is necessary to over-ride the type by specifying the format you want.

  - Dennis

It is _always_ in days rather than hours. Therefore 01:15 (1h 15m) is _always_ 0.05208 (of a day) rather than 1.25 (of an hour). You multiply days by 24 to get a number in unit hours: =0.05208*24 gives 1.25. Of course we can also enter the text value 01:15 which is a sequence of 4 digits with a colon and no numeric value at all. In 99% of all cases numeric strings are plain wrong and a pain in the ass.

If your cell is "unformatted" (number format "General"), then the resulting number format is _one_particular_ format for date, time, percent, currency etc. depending on the locale context and how you typed a numeric expression into a cell. When a formula returns a number in an "unformatted" cell, the number format is somewhat uncertain. If it looks strange just apply the number format you expect to see. This never changes the value. It just modifies the appearance of a number.

I use a default template with a set of cell styles for my most wanted number formats and text layouts. Using styles I can format huge and complex spreadsheets within a minute. In formulas you can use =<some_time_calculation>+STYLE("MyTime") which applies a whole set of formatting attributes on the fly.

[Tutorial] Ten concepts that every Calc user should know:
http://user.services.openoffice.org/en/forum/viewtopic.php?f=75&t=39529


--
Unsubscribe instructions: E-mail to users+help@global.libreoffice.org
In case of problems unsubscribing, write to postmaster@documentfoundation.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

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.