You are getting the format exception because you are telling the formatter the string is "yyyyMMdd" but it is in fact "yyyy-MM-ddTHH:mm:sszzzzzz".
What you need to do is create a dateTime object using the value, then get a string back from the dateTime object in your desired format using the ToString(...) method. E.g.
DateTime dateTime = XmlConvert.ToDateTime(xmlattribute.value);
string result = dateTime.ToString("yyyyMMdd");
edit
According to the MSDN docs the XmlConvert.ToDateTime(string)
method is depricated in favour of ToDateTime(String, XmlDateTimeSerializationMode)
. Docs are http://msdn.microsoft.com/en-us/library/system.xml.xmlconvert.todatetime.aspx
Suggest you try
DateTime dateTime = XmlConvert.ToDateTime
(xmlattribute.value,
XmlDateTimeSerializationMode.Unspecified);