Skip to content

SQL Server: Add translation for TODATETIMEOFFSET() #34756

@EmperorArthur

Description

@EmperorArthur

Issue

I am working with a SQL database that stores timestamps using "datetime", but want to convert them to a "datetimeoffset" in SQL without having to write my own function mapping.

Recommended priority.

Low.

This fills a missing niche in the list of built in function mappings.

  • Custom function mapping is already supported.
  • Though a kludge, EF.Functions.DateTimeOffsetFromParts(dateTime.Year, ...) could be used.

Proposed Solution

Map the TODATETIMEOFFSET function to "EF.Functions.DateTimeOffsetFromDateTime". Handling the TimeSpan.TotalMinutes conversion.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions