Skip to content
New issue

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

Got error in example #41

Open
blinkinglight opened this issue Sep 28, 2013 · 1 comment
Open

Got error in example #41

blinkinglight opened this issue Sep 28, 2013 · 1 comment

Comments

@blinkinglight
Copy link

error:
"unsupported time format: 2012-06-13"

result:
{3 person2 IT 0001-01-01 00:00:00 +0000 UTC}

i think it should be able to set via beedb:formatdate,2006-01-02

@yangxikun
Copy link

type Userinfo struct {
    Uid        int `beedb:"PK"`
    Username   string
    Departname string
    Created    time.Time
}

如上结构中,Created的类型为time.Time,即为2013-10-08 20:31:50.021522408 +0800 CST这种格式,而示例中created的字段类型为DATE,支持的类型是2013-10-08这种格式,所以导Select出数据时,出问题.所以要么修改struct,要么修改表字段类型.

以上是我的见解,望指教

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants