Reputation: 97
I generate an entity with
jhipster import-jdl hello.jdl
entity Hello {
title String,
myDate LocalDate
}
Default fake data is generated
hello.csv
id;title;myDate
1;mobile Fish;2019-11-17
2;Savings Account Dam;2019-11-18
Problem
However my date format is Estonian and is DD.MM.YYYY, so if I change it to following then the data is not being imported into the database. myDate field is null for both entries. Is there any way to import dates in other format than YYYY-MM-DD ?
hello.csv
id;title;myDate
1;mobile Fish;17.11.2019
2;Savings Account Dam;18.11.2019
Upvotes: 1
Views: 886
Reputation: 16294
Unfortunately you cannot change this format because Liquibase expects dates to be in "yyyy-MM-dd" format as stated in its doc:
Date/Time values included in the CSV file should be in ISO format http://en.wikipedia.org/wiki/ISO_8601 in order to be parsed correctly by Liquibase.
It's hard-coded in liquibase.util.ISODateFormat.java, so there's nothing JHipster can do about it.
Upvotes: 1