Issue 8950 - Date function returns incorrect date if year is a cel ref
Summary: Date function returns incorrect date if year is a cel ref
Status: CLOSED DUPLICATE of issue 5658
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: 643
Hardware: PC Windows 2000
: P1 (highest) Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-04 11:22 UTC by Unknown
Modified: 2003-09-08 16:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2002-11-04 11:22:58 UTC
e.g. =DATE(B6;11;10)

If there is a number 2002 in B6 this function returns the year 2000
Comment 1 daniel.rentz 2002-11-05 11:08:59 UTC
Probably B6 has text format. Please try the following:
in cell B6: Context menu -> Format cell
Number format -> Default
reenter 2002 in B6
Comment 2 Unknown 2002-11-05 20:15:57 UTC
Hmm. Yes this works. But doesn't this seems more kind of a workaround
and not a solution ?

I think an End-User would not find this one.

I also converted it from a working Excel spreadsheet. 
There must be something wrong with the conversion or this one should
work even if its text. ( I prefer the last one )
Comment 3 daniel.rentz 2002-11-06 08:58:11 UTC
Calc cannot calculate with text cells. So, in your example it sees 0
(zero), which is auto-expanded to 2000 (values from 0 to 99 are
expanded to the years 2000..2029 or 1930..1999).
The same happens with simple calculations. If you have a cell with 1
and with '1 (1 as text), and want to calculate the sum of these two
cells, the result is 1.
I know this causes problems especially after importing Excel files.


*** This issue has been marked as a duplicate of 5658 ***
Comment 4 daniel.rentz 2002-11-06 10:27:01 UTC
double->closed