Issue 25731 - Formula with DAY, TIME, HOUR - functions yields wrong value
Summary: Formula with DAY, TIME, HOUR - functions yields wrong value
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-20 14:31 UTC by tommyads
Modified: 2004-02-20 16:08 UTC (History)
1 user (show)

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


Attachments
Excel: one Cell with time and another Cell with formula (13.50 KB, application/vnd.ms-excel)
2004-02-20 14:34 UTC, tommyads
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description tommyads 2004-02-20 14:31:21 UTC
* type a time value (like 155:00:00) (i.e. Hours, Minutes, Seconds) in Cell A1
* type the following (GERMAN) formula into Cell B1 (without quotes) '=(TAG(A1)
+ZEIT(STUNDE(A1);MINUTE(A1);0))*24'
** in English the formula should be (without quotes) '=(DAY(A1)+TIME(HOUR
(A1);MINUTE(A1);0))*24'
* the formula in Cell B1 yields 131 instead of 155
* save the file in excel-format
* RESULT: the formula (which should yield the hours in decimal format, i.e. 4.5 
hours equaling 4 hours and 30 minutes) yields a different value when you load 
the file in Microsoft-Excel; in MS-Excel it yields the correct value of 155
Comment 1 tommyads 2004-02-20 14:34:52 UTC
Created attachment 13319 [details]
Excel: one Cell with time and another Cell with formula
Comment 2 frank 2004-02-20 16:07:41 UTC
Hi,

this is not a bug from OOo Calc but one from Excel.

Excel uses a different Null date as Calc and also have a bug in the leap year
usage. Since Excel 1 ?! they calculate with a leap year for 1900 but this yeear
never had a Frebruary 29. This is the problem which causes the 24 Hours
difference in your example.

I'm sorry but I've to close this one as Invalid.

Frank
Comment 3 frank 2004-02-20 16:08:21 UTC
closed invalid