//四舍六入
Response.Write(Math.Round(3.45, 1));
//四舍五入
Response.Write(Math.Round(3.45, 1,MidpointRounding.AwayFromZero));
//字符串格式转时间格式
DateTimeFormatInfo dtFormat = new DateTimeFormatInfo { LongDatePattern = "yyyy/MM/dd hh:mm:ss" };
DateTime dateT = Convert.ToDateTime("2012/06/08 09:10:10", dtFormat);
//时间格式转字符串格式
string dateS = DateTime.Now.ToString(CultureInfo.InvariantCulture);
//字符串格式转时间格式
dateT = DateTime.Parse(dateS, CultureInfo.InvariantCulture);