DateTime now = DateTime.Now; if (now < Convert.ToDateTime(now.ToString("yyyy-MM-dd")+" 02:00:00")) { this.Alert("数据还没有生成,请于2点后上来查看..."); return; }