|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
A question about Time formatHi all,
There is a time format: [HH]:mm:ss I found it has a value scope from -49710 to 49710, which means from Nov/23/1763 00:00:00 to Feb/6/2036 00:00:00. But this format show hour value as hours passed since Dec/30/1899, So it's value is 1193040:00:00. Input 49711 with this time format will display "###" in the cell. I guess it must be out side of the permitted scope. But why it has this limitation? I guess it must have something to do with the storage of the time in the memory. I wonder how it stored? and why it has this limitation? Could anyone give me some hint? Thanks and best regards, -- Lihua 北京红旗贰仟软件技术有限公司 Beijing Redflag 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.6141 http://www.RedOffice.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: A question about Time formatHi,
> There is a time format: [HH]:mm:ss this time format allows to count hours > 24 hours A1 03:00 A2 23:00 A3 =sum(a1:a2) ==> 02:00:00 if you format A3 as [HH]:mm:ss then A3 gives 26:00:00 (26 hours) > > I found it has a value scope from -49710 to 49710, which means from the value scope must be higher because I can create a date of 2036-10-10 having the date value of 49958 > Nov/23/1763 00:00:00 to Feb/6/2036 00:00:00. But this format show hour > value as hours passed since Dec/30/1899, So it's value is 1193040:00:00. > the default value for the zero point for date values is 1899-12-30. Calc can handle both negative and positive values for a date value. For the value -1 Calc would display 1899-12-29. The default value can be changed (in /tools/options/calc/calculate) to 1900-1-1 (to be compatible to StarCalc 1.0 documents) and to 1904-1-1 to stay compatible to older Excel documents. > Input 49711 with this time format will display "###" in the cell. I > guess it must be out side of the permitted scope. But why it has this > limitation? I guess it must have something to do with the storage of the > time in the memory. I wonder how it stored? and why it has this > limitation? Could anyone give me some hint? change the cell width. The value just doesn't fit into the cell boundaries. Kind regards, Joost --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: A question about Time formatHi Joost,
Thank you very much for the reply. I tried in OOo-DEV3.2 just now, input 49958 in a cell and format it to that format will show "###", and change the width doesn't work. Best regards, Lihua 在 2009-10-14三的 13:07 +0200,Joost Andrae写道: > Hi, > > > There is a time format: [HH]:mm:ss > > this time format allows to count hours > 24 hours > > A1 03:00 > A2 23:00 > A3 =sum(a1:a2) ==> 02:00:00 > > if you format A3 as [HH]:mm:ss then A3 gives 26:00:00 (26 hours) > > > > > I found it has a value scope from -49710 to 49710, which means from > > the value scope must be higher because I can create a date of 2036-10-10 > having the date value of 49958 > > > Nov/23/1763 00:00:00 to Feb/6/2036 00:00:00. But this format show hour > > value as hours passed since Dec/30/1899, So it's value is 1193040:00:00. > > > > the default value for the zero point for date values is 1899-12-30. Calc > can handle both negative and positive values for a date value. For the > value -1 Calc would display 1899-12-29. The default value can be changed > (in /tools/options/calc/calculate) to 1900-1-1 (to be compatible to > StarCalc 1.0 documents) and to 1904-1-1 to stay compatible to older > Excel documents. > > > Input 49711 with this time format will display "###" in the cell. I > > guess it must be out side of the permitted scope. But why it has this > > limitation? I guess it must have something to do with the storage of the > > time in the memory. I wonder how it stored? and why it has this > > limitation? Could anyone give me some hint? > > change the cell width. The value just doesn't fit into the cell boundaries. > > Kind regards, Joost > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@... > For additional commands, e-mail: dev-help@... > Lihua 北京红旗贰仟软件技术有限公司 Beijing Redflag 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.6141 http://www.RedOffice.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: A question about Time formatHi
Zhu Lihua schrieb: > I tried in OOo-DEV3.2 just now, input 49958 in a cell and format it to > that format will show "###", and change the width doesn't work. Using 3.2m1 on a Mac, this gives me 00:00:00 when formating as HH:MM:SS and 10.10.2036 when using DD.MM.YYYY as format. Changing row width works well too in both ways (changing the numeric value in cotext menu or dragging cell limiter with mouse). -- Mit freundlichen Grüßen Uwe Altmann OpenOffice.org auf dem Mac: http://porting.openoffice.org/mac/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: A question about Time formatIs there any reasonable explanation in technique? Or is it a bug?
在 2009-10-14三的 17:48 +0800,Zhu Lihua写道: > Hi all, > > There is a time format: [HH]:mm:ss > > I found it has a value scope from -49710 to 49710, which means from > Nov/23/1763 00:00:00 to Feb/6/2036 00:00:00. But this format show hour > value as hours passed since Dec/30/1899, So it's value is 1193040:00:00. > > Input 49711 with this time format will display "###" in the cell. I > guess it must be out side of the permitted scope. But why it has this > limitation? I guess it must have something to do with the storage of the > time in the memory. I wonder how it stored? and why it has this > limitation? Could anyone give me some hint? > > Thanks and best regards, Lihua 北京红旗贰仟软件技术有限公司 Beijing Redflag 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.6141 http://www.RedOffice.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: A question about Time formatHi Lihua,
Zhu Lihua schrieb: > Hi all, > > There is a time format: [HH]:mm:ss > > I found it has a value scope from -49710 to 49710, which means from > Nov/23/1763 00:00:00 to Feb/6/2036 00:00:00. But this format show hour > value as hours passed since Dec/30/1899, So it's value is 1193040:00:00. > > Input 49711 with this time format will display "###" in the cell. I > guess it must be out side of the permitted scope. But why it has this > limitation? I guess it must have something to do with the storage of the > time in the memory. I wonder how it stored? and why it has this > limitation? Could anyone give me some hint? I'm not sure, because I'm no developer. As far as I know, Eike maintains the number formatter. Perhaps ask him? I found this: The input number is converted to seconds and this seconds are limited to 0xffffffff (=4294967295). But I do not know why they are limited. You find it in /svtools/source/numbers/zformat.cxx. The constant is in line 71 const double _D_MAX_U_LONG_ = (double) 0xffffffff; Line 2486 generates the ### if( floor( fTime ) > _D_MAX_U_LONG_ ) { OutString = rScan.GetErrorString(); return FALSE; } kind regards Regina --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: A question about Time formatOn 10/16/09 11:56, Regina Henschel wrote:
> I found this: > > The input number is converted to seconds and this seconds are limited to > 0xffffffff (=4294967295). But I do not know why they are limited. > > You find it in /svtools/source/numbers/zformat.cxx. > The constant is in line 71 > const double _D_MAX_U_LONG_ = (double) 0xffffffff; > Line 2486 generates the ### > if( floor( fTime ) > _D_MAX_U_LONG_ ) > { > OutString = rScan.GetErrorString(); > return FALSE; > } Just look one line below that. :-) The time calculation (hours, minutes) is done in 32-bit unsigned integer. It's a limitation, but there isn't really an immediate need to change it. Niklas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: A question about Time formatHi,
Niklas Nebel schrieb: > On 10/16/09 11:56, Regina Henschel wrote: >> I found this: >> >> The input number is converted to seconds and this seconds are limited >> to 0xffffffff (=4294967295). But I do not know why they are limited. >> >> You find it in /svtools/source/numbers/zformat.cxx. >> The constant is in line 71 >> const double _D_MAX_U_LONG_ = (double) 0xffffffff; >> Line 2486 generates the ### >> if( floor( fTime ) > _D_MAX_U_LONG_ ) >> { >> OutString = rScan.GetErrorString(); >> return FALSE; >> } > > Just look one line below that. :-) > The time calculation (hours, minutes) is done in 32-bit unsigned > integer. It's a limitation, but there isn't really an immediate need to > change it. http://www.openoffice.org/issues/show_bug.cgi?id=63225 kind regards Regina --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: A question about Time formatHi Regina,
Thank you very much. So the number in the cell stands for the days after certain date. And 49711*86400 = 4295030400, it bigger than _D_MAX_U_LONG_, So it shows "###". And the other time format needn't consider the integer portion of the number, so they have no such limitation. Thanks again. Best regards, Lihua 在 2009-10-16五的 11:56 +0200,Regina Henschel写道: > Hi Lihua, > > Zhu Lihua schrieb: > > Hi all, > > > > There is a time format: [HH]:mm:ss > > > > I found it has a value scope from -49710 to 49710, which means from > > Nov/23/1763 00:00:00 to Feb/6/2036 00:00:00. But this format show hour > > value as hours passed since Dec/30/1899, So it's value is 1193040:00:00. > > > > Input 49711 with this time format will display "###" in the cell. I > > guess it must be out side of the permitted scope. But why it has this > > limitation? I guess it must have something to do with the storage of the > > time in the memory. I wonder how it stored? and why it has this > > limitation? Could anyone give me some hint? > > I'm not sure, because I'm no developer. As far as I know, Eike maintains > the number formatter. Perhaps ask him? > > I found this: > > The input number is converted to seconds and this seconds are limited to > 0xffffffff (=4294967295). But I do not know why they are limited. > > You find it in /svtools/source/numbers/zformat.cxx. > The constant is in line 71 > const double _D_MAX_U_LONG_ = (double) 0xffffffff; > Line 2486 generates the ### > if( floor( fTime ) > _D_MAX_U_LONG_ ) > { > OutString = rScan.GetErrorString(); > return FALSE; > } > > kind regards > Regina > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@... > For additional commands, e-mail: dev-help@... > Lihua 北京红旗贰仟软件技术有限公司 Beijing Redflag 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.6141 http://www.RedOffice.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free embeddable forum powered by Nabble | Forum Help |