SELECT
SUM(ReceiptDetails.ItemSellPrice * ReceiptDetails.ItemQty) AS TotalSalesForToday
FROM
(ReceiptDetails
INNER JOIN
Receipt ON ReceiptDetails.ReceiptID = Receipt.ReceiptID)
WHERE
(Receipt.ReceiptDate =?)
答案 0 :(得分:0)
使用DATE()
函数。
如果该值确实是日期,则可以进行直接比较:
WHERE Receipt.ReceiptDate = DATE()
如果ReceiptDate
也有时间成分,则:
WHERE Receipt.ReceiptDate >= DATE() AND
Receipt.ReceiptDate < DATEADD("day, 1, DATE())