aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 270403d..90a1241 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -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