i have this error "input string not in correct format"

string start = book.CheckIn;
                string end = book.CheckOut;
                string[] temp = start.Split('/');
                int startMonth = Convert.ToInt32(temp[1]);
                int colStart = Convert.ToInt32(temp[0]);
                temp = end.Split('/');
                int colEnd = Convert.ToInt32(temp[0]);
                int year = Convert.ToInt32(temp[2]);

Are the CheckIn and CheckOut properties defined as strings or datetime? If they are datetime, did you try... book.CheckIn.ToString();

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.