我知道如何獲得交易數量,但是如何獲得特定月份的計數?獲取特定月份和年份內的交易數量
如果我想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