format time when sqlTypeName is core.Varchar. Same with core.DateTime or core.TimeStamp
This commit is contained in:
parent
2513e09caa
commit
8a7477b552
|
@ -1621,7 +1621,7 @@ func (engine *Engine) formatTime(sqlTypeName string, t time.Time) (v interface{}
|
||||||
v = s[11:19]
|
v = s[11:19]
|
||||||
case core.Date:
|
case core.Date:
|
||||||
v = t.Format("2006-01-02")
|
v = t.Format("2006-01-02")
|
||||||
case core.DateTime, core.TimeStamp:
|
case core.DateTime, core.TimeStamp, core.Varchar:
|
||||||
v = t.Format("2006-01-02 15:04:05")
|
v = t.Format("2006-01-02 15:04:05")
|
||||||
case core.TimeStampz:
|
case core.TimeStampz:
|
||||||
if engine.dialect.DBType() == core.MSSQL {
|
if engine.dialect.DBType() == core.MSSQL {
|
||||||
|
|
Loading…
Reference in New Issue