sql icon indicating copy to clipboard operation
sql copied to clipboard

[BUG] `str_to_date` does not work with two-digits year

Open LantaoJin opened this issue 1 year ago • 1 comments

What is the bug? str_to_date function in https://opensearch.org/docs/latest/search-plugins/sql/functions/#date-and-time does not work with two-digits year (RFC 822 date-time formatted).

How can one reproduce the bug? Steps to reproduce the behavior: Make a similar query

SELECT str_to_date('03-Jan-24', '%d-%b-%y');

returns 0024-01-03 00:00:00

What is the expected behavior? Return 2024-01-03 00:00:00

What is your host/environment?

  • Version: OpenSearch 2.14
  • Plugins: SQL

Do you have any screenshots? If applicable, add screenshots to help explain your problem.

Do you have any additional context? Add any other context about the problem.

LantaoJin avatar Jun 12 '24 06:06 LantaoJin

[Catch All Triage - Attendees 1, 2, 3, 4, 5]

dblock avatar Jul 01 '24 16:07 dblock