开发者

Calculating days from two dates

So i have a report viewer showing data but in one of my columns i want to show the calculated 开发者_StackOverflowdays based off the previous two columns of dates in an expression property i can apply for the text box. Example of what i am trying to do

8/1/2011 8/19/2011 18 days


(endDate - startDate).TotalDays 

Substraction on two DateTimes produces TimeSpan object, which has TotalDays property

Or try DateDiff("d", endDate, startDate) (for Visual Basic only)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜