I have a database table ApplicationErrorLog in which ErrorDate is stored in String format i have tried various examples on the net but nothing is working "Been stuck for two days" Want to get all the dates greater than the date(ErrorDateFilterValue ) coming from database (ErrorDate) ...
list = (from t in objPowerSchoolAdminPortalEntities.ApplicationErrorLogs
where t.ErrorDate.CompareTo(ErrorDateFilterValue) <= 0
select t).ToList();
Tried to make iQueryable but it didnt worked -
AscendingQuery = AscendingQuery.Where(As => DateTime.Parse(DateTime.Parse(As.ErrorDate).ToShortDateString(), enUsDateFormat).ToString("yyyyMMdd") == ErrorDateFilterValue);
this is the date with which i want to compare it - ErrorateFilterValue
IFormatProvider enUsDateFormat = new CultureInfo("en-US").DateTimeFormat;
objApplicationErrorLogModal.ErrorDateFilterValue = DateTime.Parse(TempDate.ToShortDateString(), enUsDateFormat).ToString("yyyyMMdd");
I Can Convert it to any format but not the one coming from Database .
any kind of suggestions and help will be appriciated .
Thanks IN Advance.