Introduce EF.Functions.DateDiffBig* overloads returning long
Open
area-query
customer-reported
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
What problem are you trying to solve?
```
Microsoft.Data.SqlClient.SqlException (0x80131904): The datediff function resulted in an overflow. The number of dateparts separating two date/time instances is too large. Try to use datediff with a less precise datepart.
```
```cs
db.Bars.Where(x =>
EF.Functions.DateDiffMinute(x.PeriodStart, x.PeriodEnd) > validForMinutes
)
```
I can't use a less precise datepart so the solution is to use `DATEDIFF_BIG`.
```cs
db.Bars.Where(x =>
EF.Functions.DateDiffMinuteLong(x.PeriodStart, x.PeriodEnd) > validForMinutes
)
```
Am I missing something?
Contributor guide
Assessment
This issue has not been assessed yet.