我有一个很大的 flinq 查询,除其他外,它返回一个对话开始的日期。我只想返回 2011 年 1 月 1 日之后开始的对话。
我有这样的事情:
conversation.TimeOfInitiation > "1-1-2011"
但我收到此错误:
The type
System.Nullable<System.DateTime>
does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface
显然我的幼稚方法没有成功。我该如何解决这个问题?
最佳答案
http://msdn.microsoft.com/en-us/library/72cec0e0.aspx
你必须得到值(value)。 Nullable 基本上是一个带有值的通用容器。
关于f# - 如何将从数据库返回的日期与日期(字符串或其他)进行比较?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4661938/