Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlServerObjectToStringTranslator supports DateTime and DateTimeOffset, while SqlServerConvertTranslator does not #14193

Closed
MaxG117 opened this issue Dec 17, 2018 · 1 comment
Assignees
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

Comments

@MaxG117
Copy link

MaxG117 commented Dec 17, 2018

SqlServerObjectToStringTranslator supports DateTime and DateTimeOffset, so dateTime.ToString() translates to a server-executed SqlFunctionExpression CONVERT(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

@smitpatel
Copy link
Contributor

Oversight.

@smitpatel smitpatel added type-enhancement help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. labels Dec 17, 2018
@ajcvickers ajcvickers added this to the Backlog milestone Dec 19, 2018
@smitpatel smitpatel self-assigned this Jan 9, 2019
@smitpatel smitpatel modified the milestones: Backlog, 3.0.0 Jan 9, 2019
@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jan 9, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview2 Feb 6, 2019
@bricelam bricelam added the good first issue This issue should be relatively straightforward to fix. label May 31, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview2, 3.0.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants