aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/datamaps/db.go
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-08-06 14:11:15 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-08-06 14:11:15 +0100
commit0bb7c2b3ac9f8bbc148c3fbfca59fe9f600babf6 (patch)
tree7af5a9ab1b7f377635ac25d2938d4f4545276f83 /pkg/datamaps/db.go
parent8a4c985d232cdf21ec054d8c0d2fa42f581082dd (diff)
tests passing but only with the help of a hack to solve DD/MM/YY
Diffstat (limited to 'pkg/datamaps/db.go')
-rw-r--r--pkg/datamaps/db.go4
1 files changed, 4 insertions, 0 deletions
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