I want to compare two persian dates to find out which one is greater, I use this function :
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;
}
}
but it does not work, how can I do it?
EDIT: DrawStartDate
and DrawStartDate
are nvarchar(20)
in DataBase
, and these are persian date not gregorian date