string date = dr["event_date"].ToString();
string[] eventdate = date.Split('-');
int date_no = Convert.ToInt32(eventdate[2]);
I get an error
Index was outside the bounds of the array
on the last line
string date = dr["event_date"].ToString();
string[] eventdate = date.Split('-');
int date_no = Convert.ToInt32(eventdate[2]);
I get an error
Index was outside the bounds of the array
on the last line
int date_no = Convert.ToInt32(eventdate[1])
Array index starts from 0