Closed plewam closed 1 year ago
Hi,
It is a bit strange as both DateTime
and DateTimeOffset
values should be accepted - the code which throws this exception supports both:
public override void Write(ExtendedBinaryWriter writer, object value)
{
var instant = value switch
{
DateTimeOffset dto => Instant.FromDateTimeOffset(dto),
DateTime dt => ToZonedDateTime(dt).ToInstant(),
_ => throw new ArgumentException("Cannot convert value to datetime"),
};
writer.Write(ToClickHouseTicks(instant));
}
ClickHouseBulkCopySerializationException
has Row
and Index
values pointing at specific value which caused an error - can you check what is the value of exception.Row[exception.Index]
in your case?
Hi @DarkWanderer,
First of all thanks for creating this ClickHouse client library. I have the requirement for storing datetime values in millisecond precision. In order to archieve that I choose DateTime64(3) data type within ClickHouse. However I cannot get it to work with the library. It always throws me below exception:
I already tried the following conversions: