标签: sql sql-server
我正在尝试将此代码从“当前月份”更改为“年初至今”,以“ 4月”为该时段的开始。有人可以请教吗?
HAVING ( dbo.general_ledger_detail.accounting_date BETWEEN Dateadd(mm, Datediff(mm, 0, Getdate()) - 1, 0) AND Dateadd(mm, 1, Getdate()) )