[CODE] string tempStr="20060807";
//设置语言国家 
System.IFormatProvider format=new System.Globalization.CultureInfo("zh-CN",true); 
//指定转换格式 
Console.WriteLine (DateTime.ParseExact(tempStr,"yyyyMMdd",format)); 
string myDateTime="20060808153030";
string re=DateTime.ParseExact(myDateTime,"yyyyMMddHHmmss",null).ToString();
Console.WriteLine (re);[/CODE]