Apache OpenOffice (AOO) Bugzilla – Issue 113903
function DAYS() does not recognize all localized dates in date strings
Last modified: 2013-01-29 21:46:48 UTC
I have UBUNTU 10.04 and Open Office 3.2 Build:9483 and the function DAYS() does not return the correct number. My previous ver. 2.4.1 this function works as expected.
Not a valid bug report, "Does not return the correct Number" is an useless description. NOT Reproducible with "Ooo-Dev 3.3.0 multilingual version English UI WIN XP: [OOo330m1 (Build 9514)]"! DAYS shows difference 28 days between 24.03.10 and 24.02.10. @curson19 May I ask you to read our guidelines on <http://qa.openoffice.org/issue_handling/pre_submission.html> and <http://www.openoffice.org/bugs/bug_writing_guidelines.html> before you file further issues or post again here? Then please contribute a clear step by step instruction containing all observations (error messages ...), EVERY key press and EVERY mouse click how to reproduce the problem, and explain why you believe that your results are unexpected. That means (for example): do not write something like "I am not able to ...", but 6. left mouse click on … expected: …, color of … changes, … actual: no …., color remains white, no … Screenshots might help to explain the problem. Please - always specify your OOo download source, version, localization, you used for your tests! If your OS is LINUX, please check in OOo HELP/About whether you use an original OOo build or one created by your LINUX distributor. - attach a sample document (always with ODF source document)! - Always contribute a meaningful Summary I will close the issue after 10 days if we don't get required additional information.
Created attachment 71175 [details] spreadsheet
I found "Err:502" in G3 with "Ooo 3.1.1 WIN XP DE[OOO310m19 (Build 9420)]". After modification of date ("30.07.09") result was 29,07%. "Ooo-Dev 3.3.0 multilingual version English UI WIN XP: [OOo330m1 (Build 9514)]" showed "#VALUE" I have some difficulties to understand the problem and cerated a more simple "mynewexample.ods" that seems to show that there exist problems with recognition of localized country specific date strings. That indeed worked better in 3.1.1. So currently I see the effect, but can't really figure out the reason. For more details please see attached "mynewexample.ods" By the way: I believe that HELP is not useful to understand how DAYS() should work. "DAYS: Calculates the difference between two date values." That's not correct. Function calculates difference of values if the date numbers are results of other functions or if numbers are in cells and if the formula references to those cells. So syntax is "DAYS(Reference to Date2; Reference to Date1)" or similar like "DAYS(A1;A2") If dates are directly integrated into formula, DAYS calculates difference between values of date strings. @curson19: I asked you not to leave comments like "does not work".
Created attachment 71177 [details] comments from rainerbielefeld Thu Aug 19 06:21:20
DAYS expects a date and dates are numbers. If you use a string, than OOo tries to convert it to a number. Since OOo3.2 this conversion is only done, if it is unambiguous. That is only the case for ISO date format. So change the notation to ISO format and all will work in OOo3.2 and in older versions too.