diff options
Diffstat (limited to 'sqlite3.go')
-rw-r--r-- | sqlite3.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -27,6 +27,7 @@ import ( ) const SQLiteTimestampFormat = "2006-01-02 15:04:05" +const SQLiteDateFormat = "2006-01-02" func init() { sql.Register("sqlite3", &SQLiteDriver{}) @@ -313,7 +314,10 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error { if rc.decltype[i] == "timestamp" { dest[i], err = time.Parse(SQLiteTimestampFormat, s) if err != nil { - return err + dest[i], err = time.Parse(SQLiteDateFormat, s) + if err != nil { + return err + } } } else { dest[i] = s |