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


Am 16.07.2012 06:11, Andrew Douglas Pitonyak wrote:
On 07/15/2012 06:52 PM, Andreas Säger wrote:
Calc does not know any dates nor times. It's all about doubles and text.

--
View this message in context:
http://nabble.documentfoundation.org/Unexpected-behavior-while-writing-Calc-Functions-tp3995669p3995674.html

Sent from the Users mailing list archive at Nabble.com.

Although that is true, I expected a date returned from a function would
return as a double, not text. Internal Date functions in Calc appear to
return as a double and then it is smart enough to display it as a
date.... or am I mistaken?


Sorry, no magic conversion. The double is displayed as date/time when the cell is formatted accordingly. The cell value remains a double. In the context of number format "General", certain input strings are recognized as date/time and number format "General" displays one particular number format for the recognized data type. Once you applied some number format other than the "General" one, any number will be shown in that format. Nevertheless, we can queryContentCells for c.s.s.sheet.CellFlag.DATETIME because the application needs to keep track of those "special doubles" because the base date for the entire document may be changed by the user.
http://www.openoffice.org/api/docs/common/ref/com/sun/star/util/NumberFormatSettings.html#NullDate


--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
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.