google-code-export / zkspreadsheet

Automatically exported from code.google.com/p/zkspreadsheet
0 stars 1 forks source link

Bug in spreadsheet date-time display #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. style the Cell with a dateFormat of "d/m/yyyy hh:mm"
2. User enters a date (only accepts m/d/yyyy so), "11/29/2010". 
3. Hit Enter.

What is the expected output? What do you see instead?
I expect to see "29/11/2010 00:00"
Cell is shown as "29/11/2010 00:11" instead.

What version of the product are you using? On what operating system?
v2 RC2

Please provide any additional information below.
Also, when I enter a date, it will accept "11/26/2010" (US style) and convert 
it to a date but "26/11/2010" (UK style) is left as a String. Is there any way 
around this? I want to be able to input dates in the same way that they are 
displayed.

Original issue reported on code.google.com by Chris.Th...@googlemail.com on 29 Nov 2010 at 10:05

GoogleCodeExporter commented 9 years ago
>Also, when I enter a date, it will accept "11/26/2010" (US style) and convert 
it to a date but "26/11/2010" (UK style) is left as a String. Is there any way 
around this? I want to be able to input dates in the same way that they are 
displayed.

Regarding this, we mimic Excel behavior. Would you test on Excel to see if the 
behavior the same?

Original comment by chenhe...@gmail.com on 29 Nov 2010 at 1:53

GoogleCodeExporter commented 9 years ago
Yes, in Excel if I format the column as "d/m/yyyy hh:mm", I can enter text 
"27/10/2010" and it will convert to date and display as "27/10/2010 00:00".

If I enter US-date style, "10/27/2010", Excel does not recognize it as a date 
and renders it as a String "10/27/2010".

See attached capture.
Regards.

Original comment by Chris.Th...@googlemail.com on 29 Nov 2010 at 2:45

Attachments:

GoogleCodeExporter commented 9 years ago
Interesting. On my machine, Excel works the other way.

I format the cell as "d/m/yyyy hh:mm" and enter "27/10/2010", it interprets it 
as a String. but if I enter "10/27/2010", it interprets it as a date. To be 
precise, no matter what format I entered, it only interprets US style to date.

Are you using Excel 2007 and Windows XP? I guess there might has something to 
do with Window's Regional Options. My setting is English(United States). How 
about yours?

Start -> Control Panel -> Date, Time, Language, and Regional Options -> 
Reginoal and Language Options -> Regional Options

Original comment by chenhe...@gmail.com on 30 Nov 2010 at 12:47

GoogleCodeExporter commented 9 years ago
You're correct that I'm not in a US locale - I'm in the UK (Windows 7/Excel 
2007) where my Windows date format is set to dd/MM/yyyy. See attached.

Original comment by Chris.Th...@googlemail.com on 30 Nov 2010 at 9:03

Attachments:

GoogleCodeExporter commented 9 years ago
I have to think about this. Since this is a separate issue, would you post it 
as a new one. It is better one issue number for one issue only. Thanks.

Original comment by chenhe...@gmail.com on 1 Dec 2010 at 12:24

GoogleCodeExporter commented 9 years ago
Fixed since Dec. 1, 2010.

Original comment by chenhe...@gmail.com on 1 Dec 2010 at 9:35