Apache OpenOffice (AOO) Bugzilla – Issue 89532
Date field YYYYMMDD fails.
Last modified: 2017-05-20 10:47:40 UTC
See attached file with 1 form and 3 records.
Created attachment 53682 [details] Database with a form
tested using OOo 2.4, XP Using a custom date format of "YYYMMDD" will display existing records correctly, editing a date however writes an erroneous date to the attached column in the table. (Note - I noticed that the database appeared to be setup of a German local so I tried the custom formatting string JJJJMMTT also, but it made no difference )
assigning, targeting
fs->er: We use the number formatter's "IsNumberFormat( String, FormatKey, double& )" here. As format key, we pass the key of the YYYYMMDD format, as string, we pass something like "20080918". Unfortunately, the number formatter is "intelligent" enough to recognize the string as numeric value, so the returned value in fact is 20080918 as *number*, which we then force back to be a date, which results in nonsense. What we would need is a mode (or extra method) at the number formatter which tells it to *first* examine the given string with respect to the given format, and *then* attempt to interpret it as something else. (Currently, obviously the string is *first* examined for being a mere number, and *then* the format key is used to interpret it).
Reset assigne to the default "issues@openoffice.apache.org".