这是我的查询
SELECT sum(paidAmount) AS payAmount
FROM Payment
where paymentDate < #12-4-18#;
这里paymentDate = 11-4-18
答案 0 :(得分:0)
尝试以下:
SELECT sum(paidAmount) AS payAmount
FROM Payment
where paymentDate < Format (#12-4-18#, "dd-mm-yy")
答案 1 :(得分:0)
如果可能,Access会将日期解释为MM / DD / YYYY。如果要在SQL语句中可靠地输入日期,则需要使用MM / DD / YYYY或YYYY-MM-DD作为日期符号。
SELECT sum(paidAmount) AS payAmount
FROM Payment
where paymentDate < #2018-04-12#;
这当然取决于paymentDate是一个有效的日期