Hi, Peter, Glad to get your email from Germany. :)
Thanks for your details about the format and the leap year. There is a so obvious bug in Excel, it's intersting... Best regards, Zhu Lihua. ----- Original Message ----- From: "Peter Junge" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, January 29, 2008 5:48 PM Subject: Re: [qa-dev] Questions about cell format of Calc > Hi Zhu Lihua, > > Zhu Lihua wrote: >> Hi, all, >> >> When we input a time (e.g., 11:07) in a cell and convert it into one of a >> date format with time (e.g., 2008/1/29 11:07), the actual result is >> 1899/12/30 11:07. >> >> I input a 0 in cell and convert it into a date format. The result is >> 1899/12/30. >> >> So I think program takes 0 as default date information of the missing date >> information of the input time. >> >> Now my questions: >> >> 1. Why 0 equals 1899/12/30? Is this a convention or a definition of Sun? > > Yes, 1899/12/30 is a default. > >> >> 2. Is this just a date tells the users that this is not a certain date? >> because we can't determine the date it should be. > > The Excel default here is 1899/12/31. Please note it's one day > difference to OOo Calc. > >> >> BTW, I found in MSExcel, it converted into a "wrong" date: 1900/1/0. I guess >> maybe my 2nd question is the purpose? >> > > The reason behind all this is a Excel bug. Excel's internal calendar > knows the date 1900/02/29. For Excel 1900 is a leap year, although 1900 > was definitely not [1]. Because OOo developers did not consider to > implement a bug for compatibility reasons, you will find one day > difference for all days before 1900/02/29. Later dates are equal in both > applications. > > [1] Leap year rules: > - Leap year is every year, that can be divided by four (four year rule) > - Four year rule does not apply for years, that can be divided by 100, > this means i.e. 1900 is *no* leap year > - 100 year rule is not valid for years, that can be divided by 400, > this means i.e. year 2000 is a leap year > > Best regards > Peter > > -- > Peter Junge > Open Source Strategy Director > > 北京红旗中文贰仟软件技术有限公司 > Beijing Redflag Chinese 2000 Software Co., Ltd. > Building No.2, Block A, Huilongsen, 18 Xihuan Nanlu > Beijing Economic-Technological Development Area > Beijing - P.R.China > > Tel:+86-10-51570010 ext.6183 > http://www.redflag2000.cn > http://www.redflag2000.cn/english/index.htm > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
