Closed MaceWindu closed 6 years ago
When I run this test case against the reference driver, I'm getting different results than you:
SELECT
Convert(Time, Convert(VarChar(11), DatePart(Hour, [t1].[DateTimeValue])) + ':01:01') as [c1]
FROM
DateTimeTest [t1]
Results in 1900-01-01
for the date component.
SELECT Convert(time, Convert(VarChar(11), DatePart(Hour, getdate())) + ':01:01')
Results in 1900-01-01
for the date component
One extra item, in the case of converting to bigtime
:
SELECT Convert(bigtime, Convert(VarChar(11), DatePart(Hour, getdate())) + ':01:01')
Results in 0001-01-01
for the date component.
However, our driver doesn't support for bigtime
(yet)
My bad, found bug in our test :)
query:
column definition:
native provider returns time as DateTime with 1/1/0001 date part
linq2db test:
ConvertTests.ToSqlTime