CSV file date format is not recognised as set in driver properties - default is used
See original GitHub issueSystem information:
- Operating system: WINDOWS 10 Latest
- DBeaver version: 21.0.0.202103021012
- Additional extensions: none
Connection specification:
- Database name and version: Flat Files / CSV
- Driver name: Flat files / CSV
Describe the problem you’re observing:
I have data file where date is in dd/MM/yyyy format; dbeaver default format is yyyy-MM-dd I created 2 test tables and connected to dbeaver (both files in same directory): caseload2
"CreatedDate","ClientID"
01/08/1971,127207
02/04/1966,1443709
03/02/1969,144759
08/02/1987,1111932
19/01/1969,116062
and caseload1
"CreatedDate","ClientID"
1971-08-01,127207
1966-04-02,1443709
1969-02-03,144759
1987-02-08,1111932
1969-12-19,116062
I have specified column types and date format in driver properties: dateFormat: dd/MM/yyyy charset: UTF-8 columnTypes: date/integer fileExtension: .csv
above are the only bold/non-default changes to driver properties.
CreatedDate is not read at all from caseload2 CreatedDate is read from caseload1 even though I have specified other format (with slashes) in driver properties.
Steps to reproduce, if exist:
e.g. make above 2 CSV files, make CSV connection to the directory and run:
select MAX(CreatedDate)
FROM caseload2
;
MAX([CreatedDate])|
------------------|
|
and
select MAX(CreatedDate)
FROM caseload1
;
MAX([CreatedDate])|
------------------|
1987-02-08|
Include any warning/errors/backtraces from the logs
No errors are produced in logs.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
CSV date format - excel - Stack Overflow
A CSV file only contains text. That is the data is not in date format but in a text format. So when you...
Read more >Formatting Dates for CSV Imports - Administration - Echo360
The CSV file will have the proper date format. Just don't open the CSV file in Excel and expect the dates to be...
Read more >Date format recognition on sequential file - Forums - IBM
I have a csv file that I am picking up from the server using a "sequential file" stage and am having some trouble...
Read more >How import CSV file to Dbeaver - GitHub
In Driver Properties add dateFormat as in the csv file, i.e. M/dd/yyyy in our ... is not recognised as set in driver properties...
Read more >Date Properties for a Data Source - Tableau Help
You can set date properties for a data source. To do so, right-click (control-click on Mac) a data source in the Data pane...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The SQL queries listed in this issue work correctly for me using DBeaver 21.0.1.202103211229 on Windows 10.
The SQL queries also worked correctly for me using CsvJdbc directly in a Java test program.
In the DBeaver Driver properties tab under Connection Settings, I added dateFormat dd/MM/yyyy to the User Properties list, like in the screenshot below.
It is also possible to edit dateFormat directly under Driver properties, like in the screenshot below. When I do this, the SQL queries do not work, because DBeaver does not pass the dateFormat dd/MM/yyyy property down to CsvJdbc. Could this be the problem?
verified