Translate DateTimeOffset.ToUnixTime[Seconds|Milliseconds] #28925
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
community-contribution
customer-reported
good first issue
This issue should be relatively straightforward to fix.
type-enhancement
Milestone
ToUnixTime* methods on DateTimeOffset can be translated in SQL Server as
DATEDIFF(second|millisecond, '1970-01-01T00:00:00.000', [Date])
.This can even be done today verbosely with
EF.Functions
asEF.Functions.DateDiffSecond(DateTimeOffset.UnixEpoch, date)
. It would be nice if translation of ToUnixTimeSeconds/ToUnixTimeMilliseconds was supported natively.The text was updated successfully, but these errors were encountered: