1.字符转为日期格式
DateTime.Parse("2009-9-9");
DateTime dt=Convert.ToDateTime("20051126");
DateTime myDate ;
myDate = System . DateTime . ParseExact (" 20050802 ",
" yyyyMMdd ",
System . Globalization . CultureInfo . InvariantCulture );
1.字符转为日期格式
DateTime.Parse("2009-9-9");
DateTime dt=Convert.ToDateTime("20051126");
DateTime myDate ;
myDate = System . DateTime . ParseExact (" 20050802 ",
" yyyyMMdd ",
System . Globalization . CultureInfo . InvariantCulture );