// FormatTime format time as column type
FormatTime format time as column type
// FormatTime format time as column type
func FormatTime(fmtTimeStampz string, sqlTypeName string, t time.Time) (v interface{}) {
	switch sqlTypeName {
	case types.Time:
		s := t.Format("2006-01-02 15:04:05") 
		v = s[11:19]
	case types.Date:
		v = t.Format("2006-01-02")
	case types.DateTime, types.TimeStamp, types.Varchar: 
		v = t.Format("2006-01-02 15:04:05")
	case types.TimeStampz:
		if fmtTimeStampz != "" {
			v = t.Format(fmtTimeStampz)
		} else {
			v = t.Format(time.RFC3339Nano)
		}
	case types.BigInt, types.Int:
		v = t.Unix()
	default:
		v = t
	}
	return
}
func FormatTime ( fmtTimeStampz string , sqlTypeName string , t time . Time ) ( v interface { } ) { switch sqlTypeName { case types . Time : s := t . Format ( " " ) v = s [ 11 : 19 ] case types . Date : v = t . Format ( " " ) case types . DateTime , types . TimeStamp , types . Varchar : v = t . Format ( " " ) case types . TimeStampz : if fmtTimeStampz != " " { v = t . Format ( fmtTimeStampz ) } else { v = t . Format ( time . RFC3339Nano ) } case types . BigInt , types . Int : v = t . Unix ( ) default : v = t } return }
FormatTime format time as column type
FormatTime format time as column type
// time.RFC3339 // !DarthPestilane! format time when sqlTypeName is schemas.Varchar. // dialect.URI().DBType == types.MSSQL ? "2006-01-02T15:04:05.9999999Z07:00" // if dialect.URI().DBType == types.MSSQL { // 	v = t.Format("2006-01-02T15:04:05.9999999Z07:00") // } else {