I've been trying to get the Mindate from the array. But the output I've got was all dates in the array. I know there is somthing missing but I couldn't figure it out. Please help.
Thanks
aboon.
Expand|Select|Wrap|Line Numbers
- DateTime dtMinDate = new DateTime();
- string strDateFrom = emp.DateFrom;
- string [] arrDateFrom = strDateFrom.Split((new char[]{','}));
- if (arrDateFrom != null && arrDateFrom.Length > 0)
- {
- for (int j = 0; j < arrDateFrom.Length; j++)
- {
- dtMinDate = Convert.ToDateTime(arrDateFrom.GetValue(j));
- }
- Response.Write("Minimum Date: " + dtMinDate.Date.ToString());
- }