Today including time info : getdate() Today without time info : DATEADD(DAY, DATEDIFF(day, 0, getdate()), 0) Tomorrow without time info : DATEADD(DAY, DATEDIFF(day, 0, getdate()), 1) Beginning of current month : DATEADD(month, datediff(month, 0, getdate()), 0) Beginning of last month : DATEADD(month, datediff(month, 0, getdate())-1, 0)
therefore, most likely
WHERE dateColumn >= DATEADD(month, datediff(month, 0, getdate())-1, 0) AND dateColumn < DATEADD(DAY, DATEDIFF(day, 0, getdate()), 1)
RichardTheKiwi
source share