using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

namespace SilverlightWebService

{

public partial class WebForm1 : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

DateTime dt = DateTime.Now.AddDays(-10);

Response.Write("오늘날짜보다 10일전:"+dt.ToShortDateString()+"<br>");

TimeSpan ts = DateTime.Now.Subtract(dt);

double d= ts.TotalDays;

Response.Write("날짜차이간격:"+d.ToString());

}

}

+ Recent posts