[代码]--c#获取系统时间
1 public DateTime GetServerDataTime() 2 { 3 string sql = " select top 1 getdate() from sysobjects "; 4 object dateTime = data.ExecuteScalar(sql); 5 return dateTime == null ? new CommonDAL(data).GetServerDataTime() : Convert.ToDateTime(dateTime); 6 }