Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

DATE import error IN CSV file

By
Diogenes Ojeda
on 1/8/15, 9:01 PM 1,240 views

Hello everyone!


A do you think the following problem is caused by trying to import a CSV file?

'2012-12-31 23:59:59' seems not valid for the field 'Date' in row 2 date
Use the format '2012-12-31 23:59:59'

Worse, I edited the file to test and replacement date that is within him, it shows the same error warning and continues the error.


What can it be?


Thank You

1

Yenthe

--Yenthe--
6706
| 7 7 8
Turnhout, Belgium
--Yenthe--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe
On 1/9/15, 2:08 AM

Hi Diogenes

I believe your problem is that you are trying to import date + time in a date field.
A date field only takes dates (so 2012-12-31 in your example) and does not take time (23:59:59).
You'll either need to change your date field to a datetime field or remove the time from your formatting.

From the official Odoo docs:

date:

A date.

Syntax:

fields.date('Field Name' [, Optional Parameters]),
 

datetime:

Allows to store a date and the time of day in the same field.

Syntax:

fields.datetime('Field Name' [, Optional Parameters]),

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/8/15, 9:01 PM
Seen: 1240 times
Last updated: 8/26/15, 1:49 AM