开发者

Calculating days from two dates

开发者 https://www.devze.com 2023-03-29 14:42 出处:网络
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

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

精彩评论

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