Issue 13331 - Date field in csv/txt file not imported completely
Summary: Date field in csv/txt file not imported completely
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: frank
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-12 03:53 UTC by jmodzel
Modified: 2013-08-07 15:15 UTC (History)
1 user (show)

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


Attachments
Space separated file (70.48 KB, application/octet-stream)
2003-04-15 08:45 UTC, frank
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jmodzel 2003-04-12 03:53:00 UTC
A date field in a csv/txt file that includes hours, minutes & seconds (hh:mm:ss), is not imported correctly.  
Only the month, day & year are read in.  

If I read back in a .csv file that I just saved from a spreadsheet that included a date fileld with hh:mm:ss,
the hh:mm:ss are stripped.
Comment 1 frank 2003-04-14 09:54:48 UTC
Hi,

this is not a bug.

I've tested it and the values came in smoothly. Only thing to do was
to set the numberformat to date hh:mm:ss .

SoI've to close this as worksforme.

Frank
Comment 2 frank 2003-04-14 09:55:09 UTC
closed worksforme
Comment 3 frank 2003-04-15 08:44:33 UTC
Got the file and will attach it.

Reopen this Issue as it is reproducible now.

Frank
Comment 4 frank 2003-04-15 08:45:56 UTC
Created attachment 5674 [details]
Space separated file
Comment 5 frank 2003-04-15 08:47:34 UTC
Hi Eike,

open the attached file and set the first column to YMD format. The
date is imported in the correct way but the time changes.

Frank
Comment 6 frank 2003-04-15 08:48:22 UTC
Oooppps,

forgot to set the Plattform and OS.

Frank
Comment 7 frank 2003-04-15 09:04:53 UTC
Set the Target.

Frank
Comment 8 ooo 2003-04-15 17:59:45 UTC
First of all, there is no date field in the file. The date/time
combination is enclosed in double quotes and as such is explicitly
defined to be a text field. That setting the field type to date really
does result in a date in this case is more luck than it was intended.
However, I understand that it might be desirable to have this as a
defined behavior, and to also include the time value then, but this
certainly won't make it into OOo1.1

Changing type to Enhancement, lowering priority to P4, and setting
target to OOo2.0
Comment 9 ooo 2003-09-25 12:26:15 UTC
I stand corrected. Calc erroneously assumes that fields embedded in
quotes have to be literal strings. Instead the string with quotes
removed/unescaped should be parsed for numerical values, if not
specified otherwise in the import dialog.

The problem with CSV is that it is widely used but there's no real
standard specification (I like the suggestion that the "V" in the
acronym stands for "Vague" instead of "Values"). See also
http://www.wotsit.org/download.asp?f=csv
http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
http://www.python.org/peps/pep-0305.html
Comment 10 ooo 2004-05-27 12:07:02 UTC
Raise prio to P3 (only for statistical reasons to indicate that this really
should go into OOo2.0).
Comment 11 ooo 2004-07-30 12:44:32 UTC
Actually this is a defect, even if the result will be an enhancement.
Comment 12 ooo 2004-09-16 16:04:42 UTC
On branch cws_src680_csvio:
sc/source/ui/docshell/impex.cxx 1.29.12.2
Comment 13 ooo 2004-09-16 20:13:52 UTC
Reopen to reassign.
Comment 14 ooo 2004-09-16 20:14:13 UTC
Reassign to QA.
Comment 15 ooo 2004-09-16 20:14:30 UTC
Restore status.
Comment 16 frank 2004-09-21 14:24:52 UTC
Found fixed on Solaris, Linux and Windows using CWS cvsIO
Comment 17 frank 2004-11-23 13:50:10 UTC
Found fixed on Master src680m62 using Linux, Solaris and Windows Build