我知道如何获得交易数量,但是如何获得特定月份的计数?获取特定月份和年份内的交易数量
如果我想2013年3月的交易为例?
这里是我当前的查询:
textBox_PaymentsCount.Text =
(from tot in _entities.Payments
where tot.CorporationId == _currentcorp.CorporationId &&
tot.Result != null
select tot).Count().ToString(CultureInfo.InvariantCulture);
我需要由现场TransactionDateTime
,以尽量减少我查询了。
我试着指定第一天和最后一天,但最后一天的月份有所不同。
有没有简单的方法来做到这一点?
真好!我不知道这存在!我会试一试 – ErocM