SqlServerObjectToStringTranslator supports DateTime and DateTimeOffset, while SqlServerConvertTranslator does not #14193
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
good first issue
This issue should be relatively straightforward to fix.
help wanted
This issue involves technologies where we are not experts. Expert help would be appreciated.
type-enhancement
Milestone
SqlServerObjectToStringTranslator supports DateTime and DateTimeOffset, so
dateTime.ToString()
translates to a server-executed SqlFunctionExpressionCONVERT(VARCHAR(100), dateTime)
.SqlServerConvertTranslator does not support DateTime or DateTimeOffset, so
Convert.ToString(dateTime)
is evaluated locally, returning a string representation that is different from SqlServer's string representation of DateTime returned by the CONVERT function.Is there a reason for this inconsistency or is this an oversight?
Further technical details
EF Core version: 2.2.0
The text was updated successfully, but these errors were encountered: