I have been digging around on here to develop a way to convert a DBF file to a CSV file and am fairly close to the desired output but am having some strange output mismatches once the conversion is completed. In particular with date columns. We currently have a windows utility “WhiteTown wizards dbf2csv” we are moving away from and are hoping to get this accomplished on a new Linux host with Libre Office.
There is a header row that we do not need to keep in the output of the csv from the dbf file and there are dates in the columns that are coming out wrong: 14,24,28,30,31,33,36,42,43,44,45,80,129
The native format in the dbf file for today’s date would look like 20191114 (yyyymmdd) however, after converting my file with the following command the date in the csv would look like ,11/14/19, (mm/dd/yy). We need to maintain the yyyymmdd format. I have tried to adjust for not converting the header and targeting one date column to start with by running a command that looks like this: libreoffice6.2 --headless --convert-to csv:“Text - txt - csv (StarCalc)”:“44,34,76,2,14/2” file.dbf
I believe the arguments I am passing are as follows based on this document link:Filter Options - Apache OpenOffice Wiki
- Field Seperator : 44 | ,
- Text Delimiter: 34 | "
- Character Set: 76 | Unicode (UTF-8) (have tried 0: system and 12: ISO-8859-1 (Western))
- Number of First Line: 2
- Cell Format: 14/2 | Column 14 / Format Text
Is there something I am doing wrong that seems to be preventing my from getting the desired output format (yyyymmdd)? Any advice would be appreciated, please let me know if I can provide any additional details as well.