We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to return the wrong time as a string?
0000-00-00 13:14:15 --> scan into string not return parsing time "0000-00-00 13:14:15": month out of range
select * from test_date limit 20; +---------------------+ | date1 | +---------------------+ | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-09 11:02:59 | | 2021-03-09 11:03:00 | | 2021-03-09 11:03:02 | | 2021-03-09 11:03:03 | | 2021-03-09 11:03:05 | | 0000-00-00 13:14:15 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | | 2021-03-08 00:00:00 | +---------------------+
rows, err := db.Query("select date1 from mtk1.test_date") if err != nil { t.Error(err) } for rows.Next() { var b string if err := rows.Scan(&b); err != nil { fmt.Print(err) } fmt.Println("aaa", b) } if rows.Err() != nil { fmt.Println(rows.Err()) }
aaa 2021-03-08T00:00:00Z aaa 2021-03-08T00:00:00Z aaa 2021-03-08T00:00:00Z aaa 2021-03-08T00:00:00Z aaa 2021-03-08T00:00:00Z aaa 2021-03-08T00:00:00Z aaa 2021-03-08T00:00:00Z aaa 2021-03-09T11:02:59Z aaa 2021-03-09T11:03:00Z aaa 2021-03-09T11:03:02Z aaa 2021-03-09T11:03:03Z aaa 2021-03-09T11:03:05Z parsing time "0000-00-00 13:14:15": month out of range -->
Driver version (or git SHA): v1.5.0
Go version: go version go1.15.2 darwin/amd64
Server version: 5.7.32-log
Server OS: MacOS 11.2
The text was updated successfully, but these errors were encountered:
Do you use parseTime=true option? If so, disable it.
parseTime=true
Sorry, something went wrong.
No branches or pull requests
Issue description
Is it possible to return the wrong time as a string?
0000-00-00 13:14:15 --> scan into string not return parsing time "0000-00-00 13:14:15": month out of range
Example code
Error log
Configuration
Driver version (or git SHA): v1.5.0
Go version: go version go1.15.2 darwin/amd64
Server version: 5.7.32-log
Server OS: MacOS 11.2
The text was updated successfully, but these errors were encountered: