Date diff elasticsearch wrong?

Hi everyone, i found a different between datediff function on my ES and phoenix,trino.
when use SQL below my ES return 4 while phoenix and trino return 5. How this different could happened?



POST _sql?format=json
{
  "query":"""SELECT date_diff('d', '2022-09-29T12:10:00.000Z'::datetime, now()) AS "diffInDays" """,

  "time_zone":"Asia/Ho_Chi_Minh"
}

thanks so much

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.