懂得放弃,才会有新的收获!

.NET 两时间相减的天数

By weisnet On 2009-05-04 At 20:48 View:490
用TimeSpan.Days方法.

 Dim d1 As String = "2008-9-10"
 Dim d2 As String = "2007-9-30"

 Dim c As TimeSpan = Convert.ToDateTime(d1) - Convert.ToDateTime(d2)

 Response.Write(c.Days)

·上一篇:.net 验证视图状态 MAC 失败。错误信息
·下一篇:div+css图片文本底部对齐

for this post

 
 

Leave a Reply

赶快抢个沙发坐坐!
请先 登陆  还没帐号

Hot Posts Powered by weiseditor

  • Add to Google

Friend links