I have an LINQ Expression which converts the Dateformat from UTC to the date format of the User Culture.
for (int i = 0; i < datexml.count ; i++)
{
if (datatype.ToLower() == "date")
{
myList.Select(c => { ((object[])(c))[i] = ConvertFromUTCDate( Convert.ToDateTime (((object[])(c))[i]), UserTimeZone); return c; }).ToList();
}
}
Some times the date value in (object[])(c))[i] could be null or have string or decimal if the value is wrongly stored in DB.
How do I check if the values is not null and has date and then convert it in this expression.