Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LantaoJin opened this issue Jun 12, 2024 · 1 comment · May be fixed by #2841
Open

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

LantaoJin opened this issue Jun 12, 2024 · 1 comment · May be fixed by #2841
Labels
bug Something isn't working

Comments

@LantaoJin
Copy link
Member

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 LantaoJin added bug Something isn't working untriaged labels Jun 12, 2024
@LantaoJin LantaoJin changed the title [BUG] str_to_date() does not work with two-digits year [BUG] str_to_date does not work with two-digits year Jun 12, 2024
@dblock
Copy link
Member

dblock commented Jul 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants