# Cannot get loadData to work with a CSV with a DATE field

**URL:** <https://forum.liquibase.org/t/cannot-get-loaddata-to-work-with-a-csv-with-a-date-field/1623>\
**Category:** General Discussion\
**Created:** [September 14, 2011, 1:37am UTC](https://forum.liquibase.org/t/cannot-get-loaddata-to-work-with-a-csv-with-a-date-field/1623 "2011-09-14T01:37:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehsan\_k](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@ehsan\_k](https://forum.liquibase.org/u/ehsan_k)\
**Post date:** [September 14, 2011, 1:37am UTC](https://forum.liquibase.org/t/cannot-get-loaddata-to-work-with-a-csv-with-a-date-field/1623/1 "2011-09-14T01:37:00Z")

</div>

I am using liquibase v1.9.5.&nbsp; I will appreciate if&nbsp;someone can provide&nbsp;the contents of&nbsp;a functioning&nbsp;loadData xml&nbsp;(DATE field) and the corresponding csv (DATE field) contents.

&nbsp;

Ehsan

---

<div class="post-metadata">

**Author:** ![mikemil2713](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mikemil2713](https://forum.liquibase.org/u/mikemil2713)\
**Post date:** [September 14, 2011, 1:37am UTC](https://forum.liquibase.org/t/cannot-get-loaddata-to-work-with-a-csv-with-a-date-field/1623/2 "2011-09-14T01:37:00Z")

</div>

Check out this link for some detailed info  
  
[http://lizdouglass.wordpress.com/2009/02/01/liquibase-inserting-data-from-a-csv-file/](http://lizdouglass.wordpress.com/2009/02/01/liquibase-inserting-data-from-a-csv-file/)

---

<div class="post-metadata">

**Author:** ![mikemil2713](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mikemil2713](https://forum.liquibase.org/u/mikemil2713)\
**Post date:** [September 14, 2011, 1:37am UTC](https://forum.liquibase.org/t/cannot-get-loaddata-to-work-with-a-csv-with-a-date-field/1623/3 "2011-09-14T01:37:00Z")

</div>

I also ran a small test and here’s the files  
  
table script for MySQL  
&nbsp;  
/_==============================================================_/  
/\* Table: TEST\_DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _/  
/_==============================================================\*/  
create table TEST\_DATA (  
TEST\_ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NUMERIC(20)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not null,  
TEST\_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; varchar(25)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not null,  
TEST\_DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not null  
);  
  
change log to run loaddata  
  
\<?xml version="1.0" encoding="UTF-8"?\>  
\<databaseChangeLog xmlns=“[http://www.liquibase.org/xml/ns/dbchangelog](http://www.liquibase.org/xml/ns/dbchangelog)”  
&nbsp;&nbsp;&nbsp; xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)”  
&nbsp;&nbsp;&nbsp; xsi:schemaLocation=“[http://www.liquibase.org/xml/ns/dbchangelog](http://www.liquibase.org/xml/ns/dbchangelog) [http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd](http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd)”\>  
&nbsp;&nbsp;&nbsp;   
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   
&nbsp;&nbsp;&nbsp;   
  
  
  
test\_data.csv  
----------------------------  
  
“TEST\_ID”,“TEST\_NAME”,"TEST\_DATE"  
1,“test\_1”,"2011-09-13"  
2,“test\_2”,"2011-09-12"  
3,“test\_3”,"2011-09-10"  
4,“test\_4”,"2011-09-14"  
5,“test\_5”,"2011-09-15"  
6,“test\_6”,"2011-09-16"  
7,“test\_7”,"2011-09-17"  
  
Hope this helps!

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [September 14, 2011, 1:37am UTC](https://forum.liquibase.org/t/cannot-get-loaddata-to-work-with-a-csv-with-a-date-field/1623/4 "2011-09-14T01:37:00Z")

</div>

Thanks for the test case. I created&nbsp;[http://liquibase.jira.com/browse/CORE-1035](http://liquibase.jira.com/browse/CORE-1035)&nbsp;to track it better

Nathan
