2

I have a date value like '2012/01/01 12:36:55' and I want to filter SQL Server date value from this like '2012/01/01'

I can convert('2012/01/01 12:36:55', date, 102) in SQL Server to get '2012/01/01' value.

The question is : how can I convert date 2012/01/01 12:36:55' in EF LINQ query to get '2012/01/01' value when my source object still is Queryable ?

1
  • Did you ever solve this? Commented Feb 12, 2016 at 20:06

1 Answer 1

5

I Use EntityFunctions Class in System.Data.Objects namespace, and it works very well

public static class EntityFunctions

http://msdn.microsoft.com/en-us/library/system.data.objects.entityfunctions.aspx

http://msdn.microsoft.com/en-us/library/bb738626.aspx

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.