From b485c585c75be0cfff361c6a1216222e8ae0e203 Mon Sep 17 00:00:00 2001 From: Noble Mittal Date: Mon, 29 Jan 2024 11:17:21 +0530 Subject: [PATCH] Change evalToDateTime with evalToDate Signed-off-by: Noble Mittal --- go/vt/vtgate/evalengine/fn_time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/vt/vtgate/evalengine/fn_time.go b/go/vt/vtgate/evalengine/fn_time.go index f801d3d6b46..86b3b060a1d 100644 --- a/go/vt/vtgate/evalengine/fn_time.go +++ b/go/vt/vtgate/evalengine/fn_time.go @@ -1262,7 +1262,7 @@ func (b *builtinToDays) eval(env *ExpressionEnv) (eval, error) { if date == nil { return nil, nil } - dt := evalToDateTime(date, -1, env.now, env.sqlmode.AllowZeroDate()) + dt := evalToDate(date, env.now, env.sqlmode.AllowZeroDate()) if dt == nil || dt.isZero() { return nil, nil }