ClickHouse / ClickHouse/ClickHouse

Unexpected behavior in DateTime64 handling

Open
#64,963 3 comments 0 reactions 0 assignees View on GitHub
comp-datetime external unexpected behaviour
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

Issue: Inserting in a table correctly parses a formatted datetime string, but using the same string format for selecting fails.
Expected: either both fail (I hope not :) ) or both work.

https://fiddle.clickhouse.com/23946901-6458-429c-8d85-12acdaca69c0

```sql
set date_time_input_format='best_effort';

create table dd(x DateTime64(3)) engine=Memory;

insert into dd(x) values('2024-06-07 02:32:36.054-07') ;

select * from dd;

select * from dd where x>'2024-06-07 02:32:36.054-07';
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.