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+h...@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

Reply via email to