Hi,
how can I get a function like SqlMethods.DateDiffMinute?
http://msdn.microsoft.com/en-us/library ... 10%29.aspx
I want to select rows where a specified time is over:
DateTime DateTime Int32
DateTime.Now - Row.DateTime > Row.MaxMinutes
I am trying for hours now but it keeps saying that the SqlMethods
are not implemented as you said it is in version 4.xx .
Regards
SqlMethods.DateDiffMinutes
We have reproduced the issue. We are investigating it now. We will inform you about the results as soon as possible. As a temporary workaround, you can try using operations with the TimeSpan.
For example, to select rows, where the difference between the dates is more than 60 minutes, use:
For example, to select rows, where the difference between the dates is more than 60 minutes, use:
Code: Select all
var q = from c in db.Table
where (c.DateFinish.TimeOfDay - c.DateStart.TimeOfDay) > new System.TimeSpan(0, 60, 0)
select c;
Re: SqlMethods.DateDiffMinutes
We have investigated this issue. The DateDiffMinute method (as well as DateDiffMonth, DateDiffSecond and others) is bound to the SQL Server's DateDiff() built-in function, which is not available in other DBMSs (e.g., in PostgreSQL). Thus, we are not planning to support these methods in the nearest future. Instead, you can use the way we have offered you earlier.