Ask Your Question
0

Copy Date from csv

asked 2019-01-08 18:57:59 +0200

Seriously gravatar image

updated 2019-01-08 19:00:01 +0200

Hi,

I have a .ods sheet containing (among lots of other stuff) three columns with the following formats: Text; Date; Currency.

I also have a .csv file with only the same three columns.

What I now want, is to simply open the .csv with LibreOffice Calc (preferably without any import tinkering) and only copy all the stuff from the .csv to the .odt sheet.

Using Special paste and there clicking "Values Only" works for the text and currency to be pasted correctly. However, the date is prefixed with a ' and shifted to the left (and therefore treated as text?).

The .odt target date Format is DD.MM.YY (however, when I click on the cell it is represented as MM/DD/YY) The date string in the .csv is DD.MM.YY. I can modify this during the creation of the csv if this would help.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-01-08 19:30:57 +0200

preferably without any import tinkering

Well - the thing is that your data is imported not as dates, but as text. So you either have to be "tinkering with import" - which is really easy actually - or convert already imported data to dates (which is also not difficult). And that has nothing to do with cell formatting, which does not modify data type.

To define the correct data type at import time, in import dialog just right-click the dates column, and select proper date format. To convert already imported data, use Data->Text to Columns on the selected column, and do the same in the dialog.

edit flag offensive delete link more

Comments

Thanks. Changing how the .csv is imported seems to be the quickest way for me. I was hoping since it already worked out of the box for the currency fields that there might be a trick for dates too.

Seriously gravatar imageSeriously ( 2019-01-09 16:46:13 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-01-08 18:57:59 +0200

Seen: 59 times

Last updated: Jan 08