How to compare a date returned from the DB to a date (string or otherwise)?
I have a big flinq query that returns, among many other things, a date a conversation was started. I'd like to return only conversations that were started after 1-1-2011.
I have something like this:
conversation.TimeOfInitiation > "1-1-2011"
but i'm getting this error:
The type
System.Nullable<System.DateTime>
开发者_如何学JAVA does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface
obvoiusly my naive approach did not succeed. How do I get around this?
http://msdn.microsoft.com/en-us/library/72cec0e0.aspx
You have to get the value. Nullable is basically a generic container that carries a value.
精彩评论