From 0bb7c2b3ac9f8bbc148c3fbfca59fe9f600babf6 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 6 Aug 2020 14:11:15 +0100 Subject: tests passing but only with the help of a hack to solve DD/MM/YY --- pkg/datamaps/db.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/datamaps/db.go') diff --git a/pkg/datamaps/db.go b/pkg/datamaps/db.go index d95bfd7..2a63a11 100644 --- a/pkg/datamaps/db.go +++ b/pkg/datamaps/db.go @@ -243,6 +243,10 @@ func importXLSXtoDB(dmName string, returnName string, file string, db *sql.DB) e } defer insertStmt.Close() + // Hack to fix bug in Libreoffice numformats for dates + if cellData.NumFmt == "DD/MM/YY" { + cellData.SetFormat("dd/mm/yy") + } fValue, err := cellData.FormattedValue() if err != nil { return err -- cgit v1.2.3