aizatto / issues

0 stars 0 forks source link

Go Lang / MySQL: Error unsupported Scan, storing driver.Value type []uint8 into type *time.Time #3

Closed aizatto closed 4 years ago

aizatto commented 4 years ago
name "created_at": unsupported Scan, storing driver.Value type []uint8 into type *time.Time

https://stackoverflow.com/questions/29341590/how-to-parse-time-from-database

Assuming you're using the go-sql-driver/mysql you can ask the driver to scan DATE and DATETIME automatically to time.Time, by adding parseTime=true to your connection string.