How to subtract hours using DbFunctions?
I'm using .Net framework 4.5 and Entity Framework 6.0
Here's the code I wrote.
var _temp = (from x in context.LOG_ACTIVITIES
...
select new
{
RECEIVED_DATE = DbFunctions.AddHours(x.RECEIVED_DATE, -8),
...
}
);
Here's the exception message thrown.
SqlDbType.Time overflow. Value '-08:00:00' is out of range. Must be between 00:00:00.0000000 and 23:59:59.9999999.
Any help would be appreciated. TIA!