28
- July
2013
Posted By : Alexander Goida
Error: DbArithmeticExpression arguments must have a numeric common type.

From time to time you need to filter data by difference between two dates. For instance, you wanna take a difference between date from a record and Today.

Standard request will fail with the statement like the following:

In  version 4 the new utility class has been introduced – EntityFunctions. With the method of this class you can rewrite the statement above like this:

For someone who cannot use EntityFunctions for any reason there is a workaround. Long story short, you should compare the dates. The following changes might be done:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.