我想比较两个波斯日期以找出哪个更大,我使用此功能:
public static List<MatchDrawHistory> GetAllMatchDrawHistory(string startDate, string endDate)
{
using (var db= new ReceiveSendEntitiesV5())
{
var matchDrawList = db.MatchDrawHistories.Where(x => String.CompareOrdinal(x.DrawStartDate,startDate)>=0 && String.CompareOrdinal(x.DrawEndDate , endDate) <=0).ToList();
return matchDrawList;
}
}
但它不起作用,我该怎么做?
编辑: DrawStartDate
并且DrawStartDate
在nvarchar(20)
,DataBase
这些是波斯日期而不是公历日期