sql
sql copied to clipboard
[BUG] `str_to_date` does not work with two-digits year
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.