日期:2014-05-18 浏览次数:20393 次
DateTime d=new DateTime(2005,12,20); Response.Write(d.AddDays(14)); 2006-1-3
------解决方案--------------------
DateTime datetime = new DateTime(2008, 5, 2).AddDays(14); if (datetime > DateTime.Now) { }
------解决方案--------------------
我写了一个, 有详细注释:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="time.aspx.cs" Inherits="time" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>时间比较</title> </head> <body> <form id="form1" runat="server"> <div> </div> </form> </body> </html>