Issue 107279 - copy paste date from calc to base becomes text
Summary: copy paste date from calc to base becomes text
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.0
Hardware: Unknown All
: P3 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: marc.neumann
QA Contact: issues@dba
Keywords: oooqa
Depends on:
Reported: 2009-11-28 12:30 UTC by timrichardson
Modified: 2017-05-20 10:24 UTC (History)
2 users (show)

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

spreadsheet with dates to import (8.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-11-30 00:26 UTC, timrichardson
no flags Details
resulting database (HSQL) (3.29 KB, application/vnd.sun.xml.base)
2009-11-30 00:27 UTC, timrichardson
no flags Details
screenshot during import (after auto recognition button clicked) (18.86 KB, image/png)
2009-11-30 00:27 UTC, timrichardson
no flags Details
schema after import completed (33.53 KB, image/png)
2009-11-30 00:27 UTC, timrichardson
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description timrichardson 2009-11-28 12:30:24 UTC
Data in a calc spreadsheet which is a properly formatted date value in a cell of
format date becomes text when the paste is done to create a new table ("copy
definition and data"). Shouldn't it be a date field?
Comment 1 r4zoli 2009-11-28 20:47:08 UTC
Such question please ask on

Please follow the rules:

During copy wizard you can set field types. You must check you calc file if the
date inserted as text.
Comment 2 timrichardson 2009-11-28 21:47:25 UTC

I have taken more time to try to explain what I mean. Please show me the respect
to read this carefully.

1) I don't understand which rule about reporting bugs I have not followed.
Sorry. I not being annoying. I'm trying to be helpful. I'm a user trying to make
the software better. I really don't know what's wrong with my bug report. I've
clearly reported one and only one issue which is reproducible. 
The only possible mistake I made is that I have reported a "wishlist" bug.
Perhaps rather than making it invalid, you could make it issue type "Enhancement"

I think this is a bug because ...

2) The import transforms a date type to a text type. I can't see how that is
correct behaviour. 

3) Going the other way, from base to calc, works. So it's not consistent.

4) During the paste data wizard, there is an "auto recognise" data type option.
You tell it how many lines of data to scan, and I supposed it would then make a
good guess about data type. Isn't it normal to expect this to recognise dates as
dates? Competing office software suites offer the same functionality, and this
is why I expected date recognition.
If it doesn't do that, what is 'recognition' doing? 

5) I know that you can set a data type manually. That's a workaround for this
bug, in my opinion. 
Comment 3 Regina Henschel 2009-11-29 15:39:48 UTC
I cannot confirm the problem. If my column in Calc is formatted as date, then it
is recognized as date in the import dialog. Do you have really clicked on "Auto"
to start auto detection?

What kind of database do you use and which connection? For example: embedded
HSQL or MySQL with ODBC or ...?
Please specify your operating system.
Comment 4 timrichardson 2009-11-30 00:26:16 UTC
Created attachment 66398 [details]
spreadsheet with dates to import
Comment 5 timrichardson 2009-11-30 00:27:00 UTC
Created attachment 66399 [details]
resulting database (HSQL)
Comment 6 timrichardson 2009-11-30 00:27:32 UTC
Created attachment 66400 [details]
screenshot during import (after auto recognition button clicked)
Comment 7 timrichardson 2009-11-30 00:27:58 UTC
Created attachment 66401 [details]
schema after import completed
Comment 8 timrichardson 2009-11-30 00:31:30 UTC
Reproducible on
a) Linux Debian/sid and latest 3.1 packages
b) Vista and latest Go
c) XP and latest vanilaa OpenOffice 3.1.1

Affects both HSQL and MySql databases.

Attachments show how I reproduce it.
1) Open the spreadsheet
2) Make a new database
3) copy the spreadsheet
4) paste into the tables section of the database and choose to append structure
and data to make a new table.

5) Even after auto-recognition, the two spreadsheet columns formatted with a
date format import as text. One date is formatted using short notation, the
other with ISO

My locale is English-Australia.
Comment 9 marc.neumann 2009-11-30 07:22:22 UTC
Resolve issue, mark it as duplicate of issue 20680

*** This issue has been marked as a duplicate of 20680 ***
Comment 10 marc.neumann 2009-11-30 07:23:02 UTC
Comment 11 ocke.janssen 2009-11-30 08:08:08 UTC
This one is no duplicate.
Comment 12 ocke.janssen 2009-11-30 08:09:58 UTC
The problem was a variable which was initialized with a wrong value. 
I fixed the problem in cws dba33d and now all columns are recognized as date.
And thanks for the bug docs.
Comment 13 ocke.janssen 2009-11-30 08:10:46 UTC
Fixed in cws dba33d
Comment 14 ocke.janssen 2009-12-18 09:10:32 UTC
Please verify. Thanks.

You have to press Auto on the last page to get the correct types.
Comment 15 timrichardson 2009-12-19 22:30:43 UTC
Thanks for the fix. Now I'm very glad I went to the trouble of reporting it. 

I don't know how to verify until I comes to an executable I can download;
probably it will get into the Debain unstable build soon. 
Comment 16 Frank Schönheit 2009-12-19 22:39:01 UTC
oj's statement was directed to msc, our QA engineer, whose responsibility it is
to verify, not to you :)
Comment 17 marc.neumann 2010-01-13 12:49:54 UTC
reopen because it's not fixed.

a) The first and the last column is imported as DATE but the second column is
imported as double where text should be added . This generate of course an error.

b) why I need to click on the Auto button? I guess the wizard should always use
the auto recognition.
Comment 18 marc.neumann 2010-01-13 13:12:35 UTC
reassign back to oj
Comment 19 marc.neumann 2010-01-13 13:23:29 UTC
reassign back to me
Comment 20 marc.neumann 2010-01-13 13:24:40 UTC
set to fixed
Comment 21 marc.neumann 2010-01-13 13:26:33 UTC
OK, the auto function works as expected. Was my fault.
The second part which use auto recognition automatic will be fixed later.

verified in CWS dba33d

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System: