Dear All,
My list constains date/time items and I want to get the biggest value of dates. For my example, 1 May 2012 nearest day for today? how can I compare these values and get latest one with C#? I accessed the list and Items in code;
using (SPWeb web = SPContext.Current.Site.RootWeb)
{
SPList alertList = web.Lists["Alert Status"];
if (alertList != null)
{
foreach (SPListItem alertItem in alertList.Items)
{
DateTime startDate = (DateTime)alertItem["Alert Date"];
}
}
}