Skip to content

DateTimeOffset not supported #53

Description

@tomh4

Currently we are using DateTimeOffset in one of our types, and the EntityFrameworkCore Driver does not seem to handle this correclty whereas the ClickHouse.Driver.ADO did:

startDate ??= DateTimeOffset.MinValue;
endDate ??= DateTimeOffset.MaxValue;
var res = await _dbContext.Consumptions
.Where(c => c.DateTime >= startDate)
.Where(c => c.DateTime < endDate)
.SumAsync(c => c.Value, cancellationToken: cancellationToken);

where DateTime, startDate and endDate are DateTimeOffsets, gives the following error:
DB::Exception: Cannot convert string '2026-01-01 00:00:00+00:00' to type DateTime64(6): while executing function greaterOrEquals on arguments __table1.DateTime DateTime64(6) DateTime64(size = 0), '2026-01-01 00:00:00+00:00'_String String Const(size = 0, String(size = 1)). (TYPE_MISMATCH) (version 25.8.29.51 (official build))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions