Odoo Help


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.


How i can upload date data in dd-mm-yyyy H-m format from CSV file

on 12/31/15, 11:49 PM 791 views

17-12-2015 7:05' does not seem to be a valid date for field 'Order Date' 

at row 2 

Use the format '2012-12-31'     -- >  while i was use field.Date


'17-12-2015 7:05' does not seem to be a valid datetime for field 'Order Date' 

at row 2

Use the format '2012-12-31 23:59:59'  -- >  while i was use field.Datetime

how i can upload dd/mm/yyyy / H/M format   from CSV file
my actual date like that 

17-12-2015 8:38


Ray Carnes

--Ray Carnes--
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 1/1/16, 11:16 AM

CSV import expects dates in a specific format - and it tells you this - they need to be in the format "2012-12-31 23:59:59".

Unless you can change the format of the date fields in your files, you can't import them via CSV.

Krupesh is advising either to run a script, or to use Excel/Open Office to change the format of the field into the correct format.

Krupesh Laiya
On 1/1/16, 6:36 AM

write one script in python and create new csv file for the date format:

suppose you have customer csv open it using below code and format date as per requirement I had split the date with . (dot) you have to format the code as per your requirement.

from new csv file copy whole column to the original csv file you get the formatted date as per requirement.

import csv

csv_rd = csv.reader(open("customer"+".csv"), delimiter=';')

count = 0

for rec in csv_rd:

fields = rec


all_datas = []

for rec in csv_rd:


a = []

for rec in all_datas:

print rec[7]

print rec[7].split('.')

s = rec[7].split('.')[2] + '-' + rec[7].split('.')[1] + '-' + rec[7].split('.')[0]

print s


with open('eggs.csv', 'wb') as csvfile:

spamwriter = csv.writer(

csvfile, delimiter=' ', quotechar='|', quoting=csv.QUOTE_MINIMAL)

for val in a:


@krupesh is this every time task or a single time task ? bcoz i want daily upload 5-10 file with more the 2000 record in every file ... every time i(we) can't upload multiple time file like first change the date and then after upload in main place can you know about any date field which can directly convert date in dd-mm-yyyy h-m format without upload another place upload file

on 1/1/16, 6:50 AM

Please try do it from property of the column you can change property of the column may be this is help full to you.

Krupesh Laiya
on 1/1/16, 7:08 AM

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)


Asked: 12/31/15, 11:49 PM
Seen: 791 times
Last updated: 1/8/16, 1:52 AM