问题描述
大家好,
我有一个数据表,其中包含3行项目,开始日期和结束日期。我有两个文本框''Min Days''和''Max Days''。现在我必须过滤数据表,以便得到项目,其持续时间(截止日期 - 开始日期)大于最小日期且小于最大天数''。我想使用DataView.Rowfilter属性。请尽快回复。
谢谢和问候,
Srivikas。
Hi everybody,
I have a datatable which contains 3 rows ''Project'', ''Start Date'' and ''End Date''. And I have two text boxes ''Min Days'' and ''Max Days''. Now I have to filter the datatable so that I get the ''Project''s which have a duration(''Due Date'' - ''Start Date'') greater than ''Min Days'' and less than ''Max Days''. I want to use the DataView.Rowfilter property. Please reply as soon as possible.
Thanks & Regards,
Srivikas.
推荐答案
dv.RowFilter = "difference > " minDays + " and " + "difference < " + maxDays;
问题是你不使用Linq的原因?
谢谢
Question is why you are not using Linq?
Thanks
这篇关于关于两个DateTime列的差异的Datarow.Filter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!